Signal Processing¶
Signal processing utilities for resampling and downsampling time series.
running_mean ¶
downsample_mean ¶
Downsample by averaging consecutive groups of N samples.
Source code in tsfast/tsdata/signal.py
resample_interp ¶
resample_interp(x: ndarray, resampling_factor: float, sequence_first: bool = True, lowpass_cut: float = 1.0, upsample_cubic_cut: float | None = None) -> np.ndarray
Signal resampling using linear or cubic interpolation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
signal to resample with shape features x resampling_dimension or resampling_dimension x features if sequence_first=True |
required |
resampling_factor
|
float
|
factor > 0 that scales the signal |
required |
sequence_first
|
bool
|
whether the resampling dimension is the first axis |
True
|
lowpass_cut
|
float
|
upper boundary for resampling_factor that activates the lowpass filter, low values exchange accuracy for performance |
1.0
|
upsample_cubic_cut
|
float | None
|
lower boundary for resampling_factor that activates cubic interpolation at high upsampling values, None deactivates it |
None
|