eradiate.scenes.atmosphere.ArrayParticleDistribution

eradiate.scenes.atmosphere.ArrayParticleDistribution#

class eradiate.scenes.atmosphere.ArrayParticleDistribution(coords=_Nothing.NOTHING, method='linear', extrapolate='zero', *, values)[source]#

Bases: ParticleDistribution

Particle distribution specified by an array of values.

Parameters:
  • values (array-like) – An array of particle fraction values.

  • coords (array-like, optional) – Coordinates to which passed values are mapped. This array must have the same shape as values. The default value positions values at the centers of a regular grid with nodes defined by np.linspace(0, 1, len(values)).

  • method ({"linear", "nearest", "nearest-up", "zero", "slinear", "quadratic", "cubic", "previous", "next"}, default: "linear") – Interpolation method. See scipy.interpolate.interp1d (kind) for more information.

  • extrapolate ({"zero", "nearest", "method", "nan"}, default: "zero") – Extrapolation method used when evaluation is requested outside of \([\mathtt{coords[0]}, \mathtt{coords[-1]}]\). See scipy.interpolate.interp1d (fill_value) for more information. Settings map as follows:

    ArrayParticleDistribution (extrapolate)

    interp1d (fill_value)

    "zero"

    0.0

    "nearest"

    (values[0], values[-1])

    "method"

    extrapolate

    "nan"

    np.nan

Fields:
  • values (ndarray) – An array of particle fraction values.

  • coords (ndarray) – Coordinates to which passed values are mapped.

  • method (str) – Interpolation method.

  • extrapolate (str) – Extrapolation method used when evaluation is requested outside of \([\mathtt{coords[0]}, \mathtt{coords[-1]}]\).