downsample#

pyCGM2.Signal.signal_processing.downsample(array: ndarray, initFreq: float, targetedFreq: float)#

Downsampling a signal from an initial frequency to a targeted frequency.

Parameters:
  • array (np.ndarray) – Array of values representing the signal.

  • initFreq (float) – Initial sampling frequency of the signal.

  • targetedFreq (float) – Targeted sampling frequency after downsampling.

Returns:

np.ndarray – The downsampled signal array.

Raises:

ValueError – If the targeted frequency is higher than the initial frequency.