eradiate.pipelines.Gather#

class eradiate.pipelines.Gather(prefix='.*', sensor_dims=_Nothing.NOTHING, var='img')[source]#

Bases: eradiate.pipelines._core.PipelineStep

Gather raw kernel results (output as nested dictionaries) into an xarray dataset.

This pipeline step takes a nested dictionary produced by the spectral loop of an Experiment and repackages it as a Dataset. The top-level spectral index is mapped to mode-dependent spectral coordinates. Results from the sensors part of a single measurement are mapped to specified sensor dimensions, which can then be further processed by aggregation steps. Film dimensions are left unmodified and retain their metadata.

An img variable holds sensor values. An spp variable holds sample count.

Parameters
  • prefix (str, optional, default: ".*") – Prefix string used to match sensor IDs. The default value will match anything.

  • sensor_dims (list of (str or tuple), optional, default: []) – List of sensor dimensions. Each list item can be a string or a (dimension, metadata) pair.

  • var (str or tuple[str, dict], optional, default: "img") – Name of the variable containing sensor data. Optionally, a (name, metadata) pair can be passed.

Fields
  • prefix (str) – Prefix string used to match sensor IDs.

  • sensor_dims (list of (str or tuple)) – List of sensor dimensions.

  • var (str or tuple[str, dict]) – Name of the variable containing sensor data.

transform(x)[source]#

Apply the pipeline step to a given data.

Parameters

x – Data to process.

Returns

xt – Processed data.