eradiate.spectral.UniformSRF#
- class eradiate.spectral.UniformSRF(wmin=NOTHING, wmax=NOTHING, value=NOTHING)[source]#
Bases:
SpectralResponseFunction
A spectral response function uniform on a preset spectral interval.
It represents a function defined by:
\[\begin{split}f(w) = \left\{ \begin{array}{r l} \text{value} & \text{if} \ w \in [w_\mathrm{min}, w_\mathrm{max}] \\ 0 & \text{otherwise} \end{array} \right.\end{split}\]- Parameters:
- Fields:
- 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 asw
.