eradiate.spectral.QuadSpecFixed#

class eradiate.spectral.QuadSpecFixed(n, quad_type='gauss_legendre')[source]#

Bases: QuadSpec

Fixed number of quadrature points [fixed]

Use a fixed number of quadrature points for all bins. If the quadrature is specified this way, the quadrature type has to be explicitly specified using the type field.

Parameters:
  • n (int) – Number of quadrature points

  • quad_type (QuadType or str, default: "gauss_legendre") – Quadrature type

Fields:
  • n (int) – Number of quadrature points.

  • quad_type (QuadType) – Quadrature type.

classmethod convert(value)#

Attempt conversion to a QuadSpec instance. If value is a dictionary, it is passed to from_dict(); otherwise, it is left unchanged.

static default()#

Return the default spectral quadrature (Gauss-Legendre, 16 g-points).

classmethod from_dict(value)[source]#

Create a quadrature specification subtype from a dictionary. The dictionary must have a type entry, whose value maps to a give quadrature specification subtype as follows:

Parameters:

value (dict) – A dictionary mapping parameter names to their respective values.

Returns:

QuadSpec

make_quad(dataset)[source]#

Apply the quadrature generation strategy and generate a quadrature rule for a given dataset.

Parameters:

dataset (Dataset) – An xarray dataset following the CKD absorption data format, for which a quadrature rule is generated.

Returns:

Quad