alignExternalData#

pyCGM2.Tools.btkTools.alignExternalData(acq, valuesToIncorporate, triggerFrame, type='Point')#

Aligns external data (e.g., ultrasound or analog signals) to a BTK acquisition based on a trigger frame.

Parameters:
  • acq (btk.btkAcquisition) – The target BTK acquisition.

  • valuesToIncorporate (np.ndarray) – Array of external data to align (n_frames, n_columns).

  • triggerFrame (int) – The frame (or sample) in the acquisition where alignment should start.

  • type (str, optional) – Alignment type, “Point” (default) for point data (video frequency) or “Analog” for analog signals (high frequency).

Returns:

np.ndarray – Array of the aligned external data, matching the length of the acquisition (in frames or analog samples).