Skip to content

Spectral data#

Each emitter can expose measured spectral data through the public SDK.

The current public data model stores a list of samples. A sample has:

  • wavelength
  • measurement

The SDK sample shape is 380-780 nm at 1 nm intervals, for 401 samples when full visible-range data is present.

Rust#

let emitter = source.emitters().await?.into_iter().next().unwrap();
let spectral_data = emitter.spectral_data().await?;

for sample in spectral_data.samples() {
    println!("{} {}", sample.wavelength(), sample.measurement());
}

Export JSON#

enody download-spectral-data -o spectral-data.json

The JSON export is useful for reproducible experiments, notebooks, and integrations that do not need a live device connection.

Tensor conversion#

Rust tools can use the JSON export or direct spectral samples as input to their own matrix representation. Python and JavaScript wrappers also expose tensor helpers for language-specific optimization workflows.

This makes spectral optimization a regular tensor problem: choose emitter weights, multiply by measured emitter spectra, compare the mixed spectrum to a target, and update the weights.