ezmsg.sigproc.aggregate#
Functions
- ranged_aggregate(axis=None, bands=None, operation=AggregationFunction.MEAN)[source]#
Apply an aggregation operation over one or more bands.
- Parameters:
axis (str | None) – The name of the axis along which to apply the bands.
bands (list[tuple[float, float]] | None) – [(band1_min, band1_max), (band2_min, band2_max), …] If not set then this acts as a passthrough node.
operation (AggregationFunction) –
AggregationFunctionto apply to each band.
- Returns:
- Return type:
Classes
- class AggregationFunction(*values)[source]#
Bases:
OptionsEnumEnum for aggregation functions available to be used in
ranged_aggregateoperation.- NONE = 'None (all)'#
- MAX = 'max'#
- MIN = 'min'#
- MEAN = 'mean'#
- MEDIAN = 'median'#
- STD = 'std'#
- SUM = 'sum'#
- NANMAX = 'nanmax'#
- NANMIN = 'nanmin'#
- NANMEAN = 'nanmean'#
- NANMEDIAN = 'nanmedian'#
- NANSTD = 'nanstd'#
- NANSUM = 'nansum'#
- ARGMIN = 'argmin'#
- ARGMAX = 'argmax'#
- TRAPEZOID = 'trapezoid'#
- class RangedAggregate(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[RangedAggregateSettings,AxisArray,AxisArray,RangedAggregateTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
RangedAggregateSettings
- class RangedAggregateSettings(axis=None, bands=None, operation=AggregationFunction.MEAN)[source]#
Bases:
SettingsSettings for
RangedAggregate.- Parameters:
- bands: list[tuple[float, float]] | None = None#
[(band1_min, band1_max), (band2_min, band2_max), …] If not set then this acts as a passthrough node.
- operation: AggregationFunction = 'mean'#
AggregationFunctionto apply to each band.
- class RangedAggregateTransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[RangedAggregateSettings,AxisArray,AxisArray,RangedAggregateState]
- class AggregationFunction(*values)[source]#
Bases:
OptionsEnumEnum for aggregation functions available to be used in
ranged_aggregateoperation.- NONE = 'None (all)'#
- MAX = 'max'#
- MIN = 'min'#
- MEAN = 'mean'#
- MEDIAN = 'median'#
- STD = 'std'#
- SUM = 'sum'#
- NANMAX = 'nanmax'#
- NANMIN = 'nanmin'#
- NANMEAN = 'nanmean'#
- NANMEDIAN = 'nanmedian'#
- NANSTD = 'nanstd'#
- NANSUM = 'nansum'#
- ARGMIN = 'argmin'#
- ARGMAX = 'argmax'#
- TRAPEZOID = 'trapezoid'#
- class RangedAggregateSettings(axis=None, bands=None, operation=AggregationFunction.MEAN)[source]#
Bases:
SettingsSettings for
RangedAggregate.- Parameters:
- bands: list[tuple[float, float]] | None = None#
[(band1_min, band1_max), (band2_min, band2_max), …] If not set then this acts as a passthrough node.
- operation: AggregationFunction = 'mean'#
AggregationFunctionto apply to each band.
- class RangedAggregateTransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[RangedAggregateSettings,AxisArray,AxisArray,RangedAggregateState]
- class RangedAggregate(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[RangedAggregateSettings,AxisArray,AxisArray,RangedAggregateTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
RangedAggregateSettings
- ranged_aggregate(axis=None, bands=None, operation=AggregationFunction.MEAN)[source]#
Apply an aggregation operation over one or more bands.
- Parameters:
axis (str | None) – The name of the axis along which to apply the bands.
bands (list[tuple[float, float]] | None) – [(band1_min, band1_max), (band2_min, band2_max), …] If not set then this acts as a passthrough node.
operation (AggregationFunction) –
AggregationFunctionto apply to each band.
- Returns:
- Return type: