eradiate.ckd.Bin#

class eradiate.ckd.Bin(id, wmin, wmax, quad, bin_set_id=None)[source]#

Bases: object

A data class representing a spectral bin in CKD modes.

Parameters:
  • id (str) – Bin identifier.

  • wmin (quantity or float) – Bin lower spectral bound.

    Unit-enabled field (default: ucc[“wavelength”]).

  • wmax (quantity or float) – Bin upper spectral bound.

    Unit-enabled field (default: ucc[“wavelength”]).

  • quad (Quad) – Quadrature rule attached to the CKD bin.

  • bin_set_id (str) – Id of the bin set used to create this bin.

Fields:
  • id (str) – Bin identifier.

  • wmin (quantity) – Bin lower spectral bound.

  • wmax (quantity) – Bin upper spectral bound.

  • quad (Quad) – Quadrature rule attached to the CKD bin.

  • bin_set_id (str or None) – Id of the bin set used to create this bin.

classmethod convert(value)[source]#

If value is a tuple or a dictionary, try to construct a Bin instance from it. Otherwise, return value unchanged.

property bindexes#

List of associated bindexes.

Type:

list of Bindex

property wcenter#

Bin central wavelength.

Type:

quantity

property width#

Bin spectral width.

Type:

quantity