eradiate.spectral.UniformSRF

class eradiate.spectral.UniformSRF(wmin=NOTHING, wmax=NOTHING, value=1.0)

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:
  • wmin (quantity or float, default: 300 nm) – Lower bound of the interval.

  • wmax (quantity or float, default: 2500 nm) – Upper bound of the interval.

  • value (quantity or float, default: 1.0) – The value to which the phase function evaluates in its interval.

Fields:
  • wmin (quantity) – Lower bound of the interval.

  • wmax (quantity) – Upper bound of the interval.

  • value (quantity) – The value to which the phase function evaluates in its interval.

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)

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.