pub struct SpectrumRecord {
pub id: String,
pub metadata: SpectrumMetadata,
pub wavelength_axis: WavelengthAxis,
pub spectral_data: SpectralData,
pub color_science: Option<ColorScience>,
pub provenance: Option<Provenance>,
}Expand description
A single spectral measurement.
Fields§
§id: String§metadata: SpectrumMetadata§wavelength_axis: WavelengthAxis§spectral_data: SpectralData§color_science: Option<ColorScience>§provenance: Option<Provenance>Implementations§
Source§impl SpectrumRecord
impl SpectrumRecord
Sourcepub fn resample(&self, target: &WavelengthAxis, method: ResampleMethod) -> Self
pub fn resample(&self, target: &WavelengthAxis, method: ResampleMethod) -> Self
Resample this spectrum onto target, returning a new SpectrumRecord.
The source spectrum’s metadata, colour-science block, and provenance are
preserved; a ProcessingStep describing the operation is appended to
the provenance trail.
§Preconditions
The source wavelength axis must be sorted in ascending order.
WavelengthAxis values produced by this library always satisfy this
requirement; an unsorted axis will produce silently incorrect output.
§Uncertainty
Any uncertainty values on the source spectrum are not carried
forward — the returned SpectralData always has uncertainty: None.
Correct propagation of uncertainty through interpolation and averaging
requires knowledge of the correlation structure of the input errors and
is left to the caller.
Trait Implementations§
Source§impl Clone for SpectrumRecord
impl Clone for SpectrumRecord
Source§fn clone(&self) -> SpectrumRecord
fn clone(&self) -> SpectrumRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more