upsample#

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

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

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

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

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

Returns:

np.ndarray – The upsampled signal array.

Raises:

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