libs/data/utils.py
def resample_signal_linear(signal, fs_old, fs_new):
    """Returns resampled signal, from fs_old Hz to fs_new Hz.

    This implementation uses simple linear interpolation to achieve this.
    """
    t = np.cumsum(np.ones(len(signal)) / fs_old)
    t_new = np.arange(t[0], t[-1], 1 / fs_new)
    signal = interp1d(t, signal)(t_new)
    return signal
Returns resampled signal, from fs_old Hz to fs_new Hz.

    This implementation uses simple linear interpolation to achieve this.
    
Returns resampled signal, from fs_old Hz to fs_new Hz.
This implementation uses simple linear interpolation to achieve this.
Returns resampled signal from fs_old Hz to fs_new Hz . This implementation uses simple linear interpolation to achieve this .
def resample_signal_linear(signal, fs_old, fs_new):
    t = np.cumsum(np.ones(len(signal)) / fs_old)
    t_new = np.arange(t[0], t[-1], 1 / fs_new)
    signal = interp1d(t, signal)(t_new)
    return signal
def resample_signal_linear ( signal , fs_old , fs_new ) : t = np . cumsum ( np . ones ( len ( signal ) ) / fs_old ) t_new = np . arange ( t [ 0 ] , t [ - 1 ] , 1 / fs_new ) signal = interp1d ( t , signal ) ( t_new ) return signal
Returns resampled signal, from fs_old Hz to fs_new Hz.
Returns resampled signal from fs_old Hz to fs_new Hz .
"""Returns resampled signal, from fs_old Hz to fs_new Hz.

    This implementation uses simple linear interpolation to achieve this.
    """
signal
fs_old
fs_new