ezmsg.sigproc.ewmfilter#
Exponentially weighted moving average filter for streaming normalization.
Classes
- class EWM(*args, settings=None, **kwargs)[source]#
Bases:
UnitExponentially Weighted Moving Average Standardization. This is deprecated. Please use
ezmsg.sigproc.scaler.AdaptiveStandardScalerinstead.References https://stackoverflow.com/a/42926270
- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
EWMSettings
- INPUT_SIGNAL = InputStream:unlocated[AxisArray]()#
- INPUT_BUFFER = InputStream:unlocated[AxisArray]()#
- OUTPUT_SIGNAL = OutputStream:unlocated[AxisArray](self.num_buffers=32, self.force_tcp=False)#
- async initialize()[source]#
Runs when the Unit is instantiated.
This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.
This method is where you should initialize your unit’s state and prepare for message processing.
- Return type:
None
- class EWMFilter(*args, settings=None, **kwargs)[source]#
Bases:
CollectionA
Collectionthat splits the input into a branch that leads toWindowwhich then feeds intoEWM‘s INPUT_BUFFER and another branch that feeds directly intoEWM‘s INPUT_SIGNAL.This is deprecated. Please use
ezmsg.sigproc.scaler.AdaptiveStandardScalerinstead.- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
EWMFilterSettings
- INPUT_SIGNAL = InputStream:unlocated[AxisArray]()#
- OUTPUT_SIGNAL = OutputStream:unlocated[AxisArray](self.num_buffers=32, self.force_tcp=False)#
- WINDOW = <ezmsg.sigproc.window.Window object>#
- EWM = <ezmsg.sigproc.ewmfilter.EWM object>#
- configure()[source]#
A lifecycle hook that runs when the Collection is instantiated.
This is the best place to call
Unit.apply_settings()on each member Unit of the Collection. Override this method to perform collection-specific configuration of child components.- Return type:
None
- network()[source]#
Override this method and have the definition return a NetworkDefinition which defines how InputStreams and OutputStreams from member Units will be connected.
The NetworkDefinition specifies the message routing between components by connecting output streams to input streams.
- Returns:
Network definition specifying stream connections
- Return type:
NetworkDefinition
- class EWMFilterSettings(history_dur: float, axis: str | None = None, zero_offset: bool = True)[source]#
Bases:
Settings