sage.dsp.utils
Filename : utils.py Description : Short description of the file
Created on 2025-12-12 15:49:41
__author__ = Narenraju Nagarajan __copyright__ = Copyright 2025, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]
GitHub Repository: NULL
Documentation: NULL
Attributes
Functions
|
Trim corrupted edge samples from a filtered or resampled time series. |
Module Contents
- trim_edges(data, fs, trim=0.2)[source]
Trim corrupted edge samples from a filtered or resampled time series.
Digital filters and resampling operations introduce transient artefacts at the boundaries of a segment. This function removes
trimseconds from each end to discard those corrupted samples.- Parameters:
- Returns:
Trimmed time series of length
N - 2 * round(trim * fs).- Return type:
- Raises:
ValueError – If the trim length equals or exceeds half the data length.