detectGaitConsecutiveForcePlates#
- pyCGM2.ForcePlates.forceplates.detectGaitConsecutiveForcePlates(acq: btkAcquisition, mappedForcePlate: str, threshold: int = 25) Dict | None #
Detect valid and two consecutive foot contacts on force plates, identifying the leading and trailing limbs.
This function detects instances where both feet are in contact with force plates simultaneously. It is used to identify the leading and trailing limbs during gait, based on the force produced on each force plate. The function validates contacts by ensuring that the force exceeds a threshold and that foot markers are contained within the force plate’s area.
- Parameters:
acq (btk.btkAcquisition) – A BTK acquisition instance.
mappedForcePlate (str) – A string of letters indicating the foot assigned to each force plate (e.g., ‘LRX’).
threshold (int, optional) – The force threshold for force plate detection. Defaults to 25 N.
- Returns:
Optional[Dict] – A dictionary with two keys ‘Left’ and ‘Right’, each containing a list of force plate indices indicating the leading and trailing limb contacts. Returns None if no consecutive contacts are detected.