src.helpers.signal_processing.interpolation module
This module offers helper functions for signal interpolation.
They are important for the data-driven assessment, e.g. in the UNECE-R79 use case.
It includes a resample and a interpolation function based on scipy. They are mainly based on numpy arrays for fast vectorized operations. See details in their respective documentations.
Contact person: Stefan Riedmaier Creation date: 17.06.2020 Python version: 3.8
- src.helpers.signal_processing.interpolation.interpolate_signal(quantity, length, method='nearest')
This function interpolates a signal based on scipy interp1d method.
- Parameters:
quantity (np.ndarray) – signal to be interpolated
length (int) – number of samples in the interpolated signal
method (str) – (optional) scipy interpolation method
- Returns:
interpolated signal
- Return type:
np.ndarray
- src.helpers.signal_processing.interpolation.resample_signal(quantity, length)
This function resamples a signal via scipys Fourier method.
- Parameters:
quantity (np.ndarray) – signal to be resampled
length (int) – number of samples in the resampled signal
- Returns:
resampled signal
- Return type:
np.ndarray