ezmsg.sigproc.wavelets#
Functions
- cwt(frequencies, wavelet, min_phase=MinPhaseMode.NONE, axis='time', scales=None)[source]#
Perform a continuous wavelet transform. The function is equivalent to the
pywt.cwtfunction, but is designed to work with streaming data.- Parameters:
frequencies (list | tuple | ndarray[tuple[Any, ...], dtype[_ScalarT]] | None) – The wavelet frequencies to use in Hz. If None provided then the scales will be used. Note: frequencies will be sorted from smallest to largest.
wavelet (str | ContinuousWavelet | Wavelet) – Wavelet object or name of wavelet to use.
min_phase (MinPhaseMode) – See filterbank MinPhaseMode for details.
axis (str) – The target axis for operation. Note that this will be moved to the -1th dimension because fft and matrix multiplication is much faster on the last axis. This axis must be in the msg.axes and it must be of type AxisArray.LinearAxis.
scales (list | tuple | ndarray[tuple[Any, ...], dtype[_ScalarT]] | None) –
The scales to use. If None, the scales will be calculated from the frequencies. Note: Scales will be sorted from largest to smallest. Note: Use of scales is deprecated in favor of frequencies. Convert scales to frequencies using
pywt.scale2frequency(wavelet, scales, precision=10) * fs where fs is the sampling frequency.
- Returns:
A primed Generator object that expects an
AxisArrayvia .send(axis_array) of continuous data and yields anAxisArraywith a continuous wavelet transform in its data.- Return type:
Classes
- class CWT(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[CWTSettings,AxisArray,AxisArray,CWTTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
CWTSettings
- class CWTSettings(frequencies, wavelet, min_phase=MinPhaseMode.NONE, axis='time', scales=None)[source]#
Bases:
SettingsSettings for
CWTSeecwtfor argument details.- Parameters:
- min_phase: MinPhaseMode = 'No kernel modification'#
- __init__(frequencies, wavelet, min_phase=MinPhaseMode.NONE, axis='time', scales=None)#
- class CWTTransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[CWTSettings,AxisArray,AxisArray,CWTState]
- class CWTSettings(frequencies, wavelet, min_phase=MinPhaseMode.NONE, axis='time', scales=None)[source]#
Bases:
SettingsSettings for
CWTSeecwtfor argument details.- Parameters:
- min_phase: MinPhaseMode = 'No kernel modification'#
- __init__(frequencies, wavelet, min_phase=MinPhaseMode.NONE, axis='time', scales=None)#
- class CWTTransformer(*args, **kwargs)[source]#
Bases:
BaseStatefulTransformer[CWTSettings,AxisArray,AxisArray,CWTState]
- class CWT(*args, settings=None, **kwargs)[source]#
Bases:
BaseTransformerUnit[CWTSettings,AxisArray,AxisArray,CWTTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
CWTSettings
- cwt(frequencies, wavelet, min_phase=MinPhaseMode.NONE, axis='time', scales=None)[source]#
Perform a continuous wavelet transform. The function is equivalent to the
pywt.cwtfunction, but is designed to work with streaming data.- Parameters:
frequencies (list | tuple | ndarray[tuple[Any, ...], dtype[_ScalarT]] | None) – The wavelet frequencies to use in Hz. If None provided then the scales will be used. Note: frequencies will be sorted from smallest to largest.
wavelet (str | ContinuousWavelet | Wavelet) – Wavelet object or name of wavelet to use.
min_phase (MinPhaseMode) – See filterbank MinPhaseMode for details.
axis (str) – The target axis for operation. Note that this will be moved to the -1th dimension because fft and matrix multiplication is much faster on the last axis. This axis must be in the msg.axes and it must be of type AxisArray.LinearAxis.
scales (list | tuple | ndarray[tuple[Any, ...], dtype[_ScalarT]] | None) –
The scales to use. If None, the scales will be calculated from the frequencies. Note: Scales will be sorted from largest to smallest. Note: Use of scales is deprecated in favor of frequencies. Convert scales to frequencies using
pywt.scale2frequency(wavelet, scales, precision=10) * fs where fs is the sampling frequency.
- Returns:
A primed Generator object that expects an
AxisArrayvia .send(axis_array) of continuous data and yields anAxisArraywith a continuous wavelet transform in its data.- Return type: