eradiate.spectral.DeltaSRF

eradiate.spectral.DeltaSRF#

class eradiate.spectral.DeltaSRF(wavelengths)[source]#

Bases: SpectralResponseFunction

A spectral response function consisting of multiple Dirac delta distributions.

This SRF conventionally always evaluates to 0.

Parameters:

wavelengths (array-like or quantity) – An array of wavelengths specifying the translation wavelength of each Dirac delta. Wavelength values are positive and unique. When a single value is provided, it is converted to a 1-element array. Wavelength are deduplicated and sorted by ascending values. Unit-enabled field (default: ucc["wavelength"]).

Fields:

wavelengths (quantity) – An array of wavelengths specifying the translation wavelength of each Dirac delta.

static convert(value)#

Converter for the Measure.srf field.

Notes

Supported conversion protocols:

  • dict: Dispatch to subclass based on ‘type’ entry, then pass dictionary to constructor as keyword arguments.

  • Dataset, DataArray: Call BandSRF.from_dataarray().

  • Path-like: Attempt loading a dataset from the hard drive, then call BandSRF.from_dataarray().

  • str: Perform a NetCDF file lookup in the SRF database and load it.

Anything else will pass through this converter without modification.

eval(w)[source]#

Evaluate the spectral response function for one or several wavelengths. Evaluation is vectorized.

Parameters:

w (array-like) – One or several wavelengths at which the SRF is evaluated.

Returns:

quantity – The returned value as the same shape as w.