sup3r.preprocessing.derivers.methods.DerivedFeature

sup3r.preprocessing.derivers.methods.DerivedFeature#

class DerivedFeature[source]#

Bases: ABC

Abstract class for special features which need to be derived from raw features

Note

inputs list will be used to search already derived / loaded data so this should include all features required for a successful .compute call.

Methods

compute(data, **kwargs)

Compute method for derived feature.

Attributes

inputs

abstract classmethod compute(data: Sup3rX | Sup3rDataset, **kwargs)[source]#

Compute method for derived feature. This can use any of the features contained in the xr.Dataset data and the attributes (e.g. .lat_lon, .time_index accessed through Sup3rX accessor).

Parameters:
  • data (Union[Sup3rX, Sup3rDataset]) – Initialized and standardized through a Loader with a specific spatiotemporal extent rasterized for the features contained using a Rasterizer.

  • kwargs (dict) – Optional keyword arguments used in derivation. height is a typical example. Could also be pressure.