eradiate.contexts.CKDSpectralContext#
- class eradiate.contexts.CKDSpectralContext(bindex=_Nothing.NOTHING, bin_set='10nm')[source]#
Bases:
SpectralContext
CKD spectral context data structure.
- Parameters:
- Fields:
- static convert(value)#
Object converter method.
If
value
is a dictionary, this method usesfrom_dict()
to create aSpectralContext
.Otherwise, it returns
value
.
- evolve(**changes)#
Create a copy of self with changes applied.
- Parameters:
**changes – Keyword changes in the new copy.
- Returns:
<same type as self>
– A copy of self withchanges
incorporated.
- static from_dict(d)#
Create from a dictionary. This class method will additionally pre-process the passed dictionary to merge any field with an associated
"_units"
field into apint.Quantity
container.- Parameters:
d (
dict
) – Configuration dictionary used for initialisation.- Returns:
SpectralContext
– Created object. The actual type depends on context.
See also
- static new(**kwargs)#
Create a new instance of one of the
SpectralContext
child classes. The instantiated class is defined based on the currently active mode. Keyword arguments are passed to the instantiated class’s constructor.- Parameters:
**kwargs – Keyword arguments depending on the currently active mode (see below for a list of actual keyword arguments).
wavelength (
quantity
orfloat
, default:550 nm
) – (Monochromatic modes [MonoSpectralContext
]) Wavelength. Unit-enabled field (default: ucc[wavelength]).bindex (
Bindex
, optional, default: 1st quadrature point for the"550"
bin of the"10nm"
bin set (test value)) – (CKD modes [CKDSpectralContext
]) CKD bindex.bin_set (
BinSet
orstr
orNone
, optional, default:"10nm"
(test value)) – (CKD modes [CKDSpectralContext
]) Bin set from which the bindex originates.
See also
- property spectral_index#
Spectral index associated with spectral context, equal to active bindex (bin ID, quadrature point index pair).
- property wavelength#
Wavelength associated with spectral context. Alias for
self.bindex.bin.wcenter
.- Type:
quantity