ezmsg.sigproc.gaussiansmoothing#
Gaussian kernel smoothing filter.
Functions
- gaussian_smoothing_filter_design(sigma=1.0, width=4, kernel_size=None)[source]#
Design a normalized Gaussian FIR kernel.
sigmais in samples; callers with a time-domain sigma must scale by the sampling rate first.
Classes
- class GaussianSmoothingFilter(*args, settings=None, **kwargs)[source]#
Bases:
BaseFilterByDesignTransformerUnit[GaussianSmoothingSettings,GaussianSmoothingFilterTransformer]- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
GaussianSmoothingSettings
- class GaussianSmoothingFilterTransformer(*args, **kwargs)[source]#
Bases:
FilterByDesignTransformer[GaussianSmoothingSettings,tuple[ndarray[tuple[Any, …],dtype[_ScalarT]],ndarray[tuple[Any, …],dtype[_ScalarT]]]]
- class GaussianSmoothingSettings(axis: str | None = None, coef_type: str = 'ba', use_fast_sosfilt: bool = True, use_mlx_metal: bool = True, mlx_metal_chunk_sizes: tuple[int, ...] = (512,), thread_min_bytes: int = 1048576, fir_fft_min_taps: int = 64, sigma: float | None = 0.01, width: int | None = 4, kernel_size: int | None = None)[source]#
Bases:
FilterBaseSettings- Parameters:
- sigma: float | None = 0.01#
float Standard deviation of the Gaussian kernel, in seconds. Converted to samples using the sampling rate of the first message. The -3 dB corner frequency is sqrt(ln 2) / (2 * pi * sigma); the default of 0.01 s is equivalent to a ~13.2 Hz low-pass.
- Type:
- width: int | None = 4#
int Number of standard deviations covered by the kernel window if kernel_size is not provided.
- Type:
- kernel_size: int | None = None#
int | None Length of the kernel in samples. If provided, overrides automatic calculation.
- Type:
- __init__(axis=None, coef_type='ba', use_fast_sosfilt=True, use_mlx_metal=True, mlx_metal_chunk_sizes=(512,), thread_min_bytes=1048576, fir_fft_min_taps=64, sigma=0.01, width=4, kernel_size=None)#