eradiate.spectral.BinSet#
- class eradiate.spectral.BinSet(bins)[source]#
Bases:
SpectralSet
A data class representing a bin set used in CKD mode.
See also
- classmethod arange(start, stop, step=<Quantity(10.0, 'nanometer')>, quad=None)[source]#
Generate a bin set with linearly spaced bins.
- Parameters:
start (
quantity
orfloat
) – Lower bound of first bin. If a float is passed, it is interpreted as being in units of nm.stop (
quantity
) – Upper bound of last bin. If a float is passed, it is interpreted as being in units of nm.step (
quantity
, default:10 nm
) – Bin width. If a float is passed, it is interpreted as being in units of nm.quad (
Quad
, optional) – Quadrature rule (same for all bins in the set). Defaults to a one-point Gauss-Legendre quadrature.
- Returns:
BinSet
– Generated bin set.
- classmethod default()[source]#
Generate a default bin set, which covers Eradiate’s default spectral range with 10 nm-wide bins.
- classmethod from_absorption_data(datasets, quad_spec=None)[source]#
Generate a bin set from one or several absorption datasets.
- Parameters:
- Returns:
BinSet
– Generated bin set.
Notes
Assumes that the absorption datasets have a
wbounds
data variable.
- classmethod from_srf(srf, step=<Quantity(10.0, 'nanometer')>, quad=None)[source]#
Generate a bin set with linearly spaced bins covering the spectral range of a spectral response function.
- property wcenters#
Return the central wavelength of all bins.
- property wmaxs#
Return the upper bound of all bins.
- property wmins#
Return the lower bound of all bins.