eradiate.spectral.SpectralResponseFunction#

class eradiate.spectral.SpectralResponseFunction[source]#

Bases: ABC

An interface defining the spectral response function of an instrument.

static convert(value)[source]#

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.

abstract 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.