eradiate.pipelines.ApplySpectralResponseFunction#

class eradiate.pipelines.ApplySpectralResponseFunction(measure, vars=_Nothing.NOTHING)[source]#

Bases: PipelineStep

Apply spectral response function to specified variables.

This post-processing pipeline step applies the spectral response function to specified variables. It creates new corresponding data variables with no dependency against the wavelength dimension.

Parameters:
  • measure (Measure) – A Measure instance from which the processed data originates.

  • vars (str or list of str, default: []) – List of variables to which the spectral response function is to be applied.

Fields:
  • measure (Measure) – A Measure instance from which the processed data originates.

  • vars (list of str) – List of variables to which the spectral response function is to be applied.

Notes

The processed dataset is expected to have a bin coordinate, associated with bounds bin_wmin and bin_wmax. If not, transform() will raise an exception.

A common nomenclature practice refers to this process as “convolution” [Burggraaff, 2020], but we prefer to avoid this term as we consider it to refer to another mathematical operation defined by:

\[(f \ast g) \, (t) := \int_{-\infty}^{+\infty} f(\tau) \, g(t - \tau) \, d\tau\]

Instead, we adopt the term “spectral response weighted average” since the operation is defined by:

\[\overline{x} = \frac{\int x(\lambda) \, w(\lambda) \, d\lambda} {\int w(\lambda) \, d\lambda}\]

where

  • \(x\) is the variable to be weighted,

  • \(w\) is the spectral response function,

and which effectively translates into a weighted average in numerical form, with the weights being the spectral response function values.

transform(x)[source]#

Apply the pipeline step to a given data.

Parameters:

x – Data to process.

Returns:

xt – Processed data.