GroundReactionForceAdapterFilter#

class pyCGM2.Model.modelFilters.GroundReactionForceAdapterFilter(btkAcq: btkAcquisition, globalFrameOrientation: str = 'XYZ', forwardProgression: bool = True)#

Filter to standardize ground reaction force data in a biomechanical model.

This filter processes ground reaction force data to conform to a standardized nomenclature and coordinate system, making it consistent and easier to interpret across different analyses. The output force vectors are aligned with the specified global frame orientation and take into account the direction of progression.

Parameters:
  • btkAcq (btk.btkAcquisition) – Acquisition instance containing dynamic trial data.

  • globalFrameOrientation (str, optional) – Orientation of the global reference frame. Defaults to “XYZ”.

  • forwardProgression (bool, optional) – Indicates if the subject moves in the same direction as the global longitudinal axis. Defaults to True.

gaitFilename = "gait1.c3d"
acqGaitYf = btkTools.smartReader(data_path + gaitFilename)
mfpa = "RLX"

mappedForcePlate = forceplates.matchingFootSideOnForceplate(acqGaitYf, mfpa=mfpa)
forceplates.addForcePlateGeneralEvents(acqGaitYf, mappedForcePlate)
LOGGER.logger.warning("Manual Force plate assignment : %s" % mappedForcePlate)

# Assembly foot and force plate
modelFilters.ForcePlateAssemblyFilter(model, acqGaitYf, mappedForcePlate,
                                    leftSegmentLabel="Left Foot",
                                    rightSegmentLabel="Right Foot").compute(pointLabelSuffix=None)
progressionAxis, forwardProgression, globalFrame = progression.detectProgressionFrame(acqGaitYf)

cgrff = modelFilters.GroundReactionForceAdapterFilter(acqGaitYf, globalFrameOrientation=globalFrame, forwardProgression=forwardProgression)
cgrff.compute()
__init__(btkAcq: btkAcquisition, globalFrameOrientation: str = 'XYZ', forwardProgression: bool = True)#

Methods

__init__(btkAcq[, globalFrameOrientation, ...])

compute([pointLabelSuffix])

Execute the filter to standardize ground reaction forces.

compute(pointLabelSuffix: str | None = None)#

Execute the filter to standardize ground reaction forces.

The method adjusts ground reaction force vectors according to the global frame orientation and subject’s direction of progression. It appends standardized force vectors to the acquisition data.

Parameters:

pointLabelSuffix (str, optional) – Suffix to be added to the label of the output ground reaction force data. Defaults to None.