Zephyr Scientific Library (zscilib)
Data Fields
zsl_clr_spd Struct Reference

Spectral power distribution for a specific illumination. More...

#include <colorimetry.h>

Data Fields

size_t size
 
struct {
   unsigned int   nm
 
   zsl_real_t   value
 
comps []
 

Detailed Description

Spectral power distribution for a specific illumination.

This struct contains the illuminant power at given wavelength intervals.

Example

The following code defines a zsl_clr_spd instance for an illumnation that was captured on a spectrograph in 20 nm intervals between 380 and 780 nm, for a total of 21 data samples.

CCT was calculated as 5983.00 K and 0.0033 Duv, with an output CIE 1931 XYZ tristimulus of X: 0.9516409, Y: 1.0000000, Z: 1.0059365.

const struct zsl_clr_spd zsl_clr_test_spd_5983k = {
.size = 21,
.comps = {
{ .nm = 380, .value = 0.290 },
{ .nm = 400, .value = 0.471 },
{ .nm = 420, .value = 0.719 },
{ .nm = 440, .value = 0.826 },
{ .nm = 460, .value = 1.006 },
{ .nm = 480, .value = 0.989 },
{ .nm = 500, .value = 0.955 },
{ .nm = 520, .value = 0.910 },
{ .nm = 540, .value = 0.950 },
{ .nm = 560, .value = 0.912 },
{ .nm = 580, .value = 0.848 },
{ .nm = 600, .value = 0.814 },
{ .nm = 620, .value = 0.827 },
{ .nm = 640, .value = 0.771 },
{ .nm = 660, .value = 0.749 },
{ .nm = 680, .value = 0.766 },
{ .nm = 700, .value = 0.705 },
{ .nm = 720, .value = 0.599 },
{ .nm = 740, .value = 0.850 },
{ .nm = 760, .value = 0.699 },
{ .nm = 780, .value = 0.898 }
}
};

Definition at line 515 of file colorimetry.h.

Field Documentation

◆ comps

struct { ... } zsl_clr_spd::comps[]

The spectral component data that makes up the spd.

◆ nm

unsigned int zsl_clr_spd::nm

The wavelength in nm for this specific sample.

Definition at line 520 of file colorimetry.h.

◆ size

size_t zsl_clr_spd::size

The number of elements in the component array.

Definition at line 517 of file colorimetry.h.

◆ value

zsl_real_t zsl_clr_spd::value

The relative value of this specific sample.

Definition at line 522 of file colorimetry.h.


The documentation for this struct was generated from the following file:
zsl_clr_spd::size
size_t size
Definition: colorimetry.h:517
zsl_clr_spd
Spectral power distribution for a specific illumination.
Definition: colorimetry.h:515