ezmsg.sigproc.singlebandpow#
Time-domain single-band power estimation.
Two methods are provided:
RMS Band Power — Bandpass filter, square, window into bins, take the mean, optionally take the square root.
Square-Law + LPF Band Power — Bandpass filter, square, lowpass filter (smoothing), downsample.
Classes
- class RMSBandPower(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[RMSBandPowerSettings,AxisArray,AxisArray,RMSBandPowerTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
RMSBandPowerSettings
- class RMSBandPowerSettings(bandpass=<factory>, bin_duration=0.05, apply_sqrt=True)[source]#
Bases:
SettingsSettings for
RMSBandPowerTransformer.- Parameters:
bandpass (ButterworthFilterSettings)
bin_duration (float)
apply_sqrt (bool)
- bandpass: ButterworthFilterSettings#
Butterworth bandpass filter settings. Set
cutonandcutoffto define the band.
- apply_sqrt: bool = True#
If True, output is RMS (root-mean-square). If False, output is mean-square power.
- __init__(bandpass=<factory>, bin_duration=0.05, apply_sqrt=True)#
- Parameters:
bandpass (ButterworthFilterSettings)
bin_duration (float)
apply_sqrt (bool)
- Return type:
None
- class RMSBandPowerTransformer(*args, **kwargs)[source]#
Bases:
CompositeProcessor[RMSBandPowerSettings,AxisArray,AxisArray]RMS band power estimation.
Pipeline: bandpass -> square -> window(bins) -> mean(time) -> rename bin->time -> [sqrt]
- class SquareLawBandPower(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[SquareLawBandPowerSettings,AxisArray,AxisArray,SquareLawBandPowerTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
SquareLawBandPowerSettings
- class SquareLawBandPowerSettings(bandpass=<factory>, lowpass=<factory>, downsample=<factory>)[source]#
Bases:
SettingsSettings for
SquareLawBandPowerTransformer.- Parameters:
bandpass (ButterworthFilterSettings)
lowpass (ButterworthFilterSettings)
downsample (DownsampleSettings)
- bandpass: ButterworthFilterSettings#
Butterworth bandpass filter settings. Set
cutonandcutoffto define the band.
- lowpass: ButterworthFilterSettings#
Butterworth lowpass filter settings for smoothing the squared signal.
- __init__(bandpass=<factory>, lowpass=<factory>, downsample=<factory>)#
- Parameters:
bandpass (ButterworthFilterSettings)
lowpass (ButterworthFilterSettings)
downsample (DownsampleSettings)
- Return type:
None
- downsample: DownsampleSettings#
Downsample settings for rate reduction after lowpass smoothing.
- class SquareLawBandPowerTransformer(*args, **kwargs)[source]#
Bases:
CompositeProcessor[SquareLawBandPowerSettings,AxisArray,AxisArray]Square-law + LPF band power estimation.
Pipeline: bandpass -> square -> lowpass -> downsample