ezmsg.sigproc.singlebandpow#

Time-domain single-band power estimation.

Two methods are provided:

  1. RMS Band Power — Bandpass filter, square, window into bins, take the mean, optionally take the square root.

  2. 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: Settings

Settings for RMSBandPowerTransformer.

Parameters:
bandpass: ButterworthFilterSettings#

Butterworth bandpass filter settings. Set cuton and cutoff to define the band.

bin_duration: float = 0.05#

Duration of each non-overlapping bin in seconds.

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:
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: Settings

Settings for SquareLawBandPowerTransformer.

Parameters:
bandpass: ButterworthFilterSettings#

Butterworth bandpass filter settings. Set cuton and cutoff to define the band.

lowpass: ButterworthFilterSettings#

Butterworth lowpass filter settings for smoothing the squared signal.

__init__(bandpass=<factory>, lowpass=<factory>, downsample=<factory>)#
Parameters:
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