Processing

analysis

The main goal of this module is to construct an Analysis instance. It’s a matlab-like structure with spatio temporal (stp), kinematics, kinetics and emg parameters as attributes.

The implementation is based on a Builder pattern . The AnalysisFilter calls a procedure and return the final Analysis instance

class pyCGM2.Processing.analysis.Analysis

Object built from AnalysisFilter.build().

Analysis work as class-container. Its attributes are:

  • stpStats (dict) - descritive statictics (mean,sd,median) of satiotemporal parameters

  • kinematicStats (AnalysisStructure) - descritive statictics of kinematics data.

  • kineticStats (AnalysisStructure) - descritive statictics of kinetics data.

  • emgStats (AnalysisStructure) - descritive statictics of emg data.

Two items constitute the AnalysisStructure returns by kinematicStats, kineticStats and emgStats

  • data is a a dict collecting descriptive statistics of kinematic, kinetic or emg output.

  • pst returns the spatiotemporal parameters of the cycles associated to kinematic, kinetics or emg outputs.

Examples

If you want to return the mean, sd, and median of the left hip angles, time normalized from left gait events

>>> analysis.kinematicStats.data["LHipAngles", "Left"]["mean"] #return array(101,3)
>>> analysis.kinematicStats.data["LHipAngles", "Left"]["sd"] #return array(101,3)
>>> analysis.kinematicStats.data["LHipAngles", "Left"]["median"] #return array(101,3)

You can also get all-cycle values from the below code.

>>> analysis.kinematicStats.data["LHipAngles", "Left"]["values"] #return list (length=number of cycle) of array(101,3)
class pyCGM2.Processing.analysis.AnalysisBuilder(cycles, kinematicLabelsDict=None, kineticLabelsDict=None, pointlabelSuffix=None, emgLabelList=None, modelInfos=None, subjectInfos=None, experimentalInfos=None, emgs=None)

Analysis builder

Unlike GaitAnalysisBuilder, this builder does not compute spatiotemporal parameters

Parameters
  • cycles (pyCGM2.Processing.cycle.Cycles) – Cycles instance built from CycleFilter

  • kinematicLabelsDict (dict) – dictionary with two items (Left and Right) grouping kinematic output label

  • kineticLabelsDict (dict) – dictionary with two items (Left and Right) grouping kinetic output label

  • pointlabelSuffix (dict) –

  • emgLabelList (list of str) – labels of used emg

  • subjectInfos (dict) – information about the subject

  • modelInfos (dict) – information about the model

  • experimentalInfos (dict) – information about the experimental conditions

Notes

modelInfos,`experimentalInfos`, subjectInfos are simple dictionaries used to store basic information. When the analysis is exported as speadsheet, these informations appear as columns.

computeEmgEnvelopes()

Compute descriptive stats of the emg envelops

computeKinematics()

Compute descriptive stats of the kinematic parameters

computeKinetics()

Compute descriptive stats of the kinetic parameters

class pyCGM2.Processing.analysis.AnalysisFilter

Filter building an Analysis instance.

build()

Run the filter and build the analysis

setBuilder(concreteBuilder)

Set a concrete builder

Parameters

concreteBuilder (Builder) –

setInfo(subject=None, experimental=None, model=None)

Set informations

Parameters
  • subject (dict,Optional[None]) – subject info

  • experimental (dict,Optional[None]) – xperimental info

  • model (dict,Optional[None]) – model info

class pyCGM2.Processing.analysis.GaitAnalysisBuilder(cycles, kinematicLabelsDict=None, kineticLabelsDict=None, pointlabelSuffix=None, emgLabelList=None, modelInfos=None, subjectInfos=None, experimentalInfos=None, emgs=None)

Gait analysis Builder.

Parameters
  • cycles (pyCGM2.Processing.cycle.Cycles) – Cycles instance built from CycleFilter

  • kinematicLabelsDict (dict) – dictionary with two items (Left and Right) grouping kinematic output label

  • kineticLabelsDict (dict) – dictionary with two items (Left and Right) grouping kinetic output label

  • pointlabelSuffix (dict) –

  • emgLabelList (list of str) – labels of used emg

  • subjectInfos (dict) – information about the subject

  • modelInfos (dict) – information about the model

  • experimentalInfos (dict) – information about the experimental conditions

Notes

modelInfos,`experimentalInfos`, subjectInfos are simple dictionaries used to store basic information. When the analysis is exported as speadsheet, these informations appear as columns.

computeEmgEnvelopes()

Compute descriptive stats of the emg envelops

computeKinematics()

Compute descriptive stats of the kinematic parameters

computeKinetics()

Compute descriptive stats of the kinetic parameters

computeSpatioTemporel()

compute descriptive stats of the spatio-temporal parameters

analysisHandler

pyCGM2.Processing.analysisHandler.getAnalysisSection(analysisInstance, label, context)

return the section ( ie kinematic, kinetic or emg) of a given label and its context

Parameters
pyCGM2.Processing.analysisHandler.getNumberOfCycle(analysisInstance, label, context)

return the number of cycle from a given ouput and its event context.

Parameters
pyCGM2.Processing.analysisHandler.getPhases(dataStats, context='Both')

get phases

Parameters
  • dataStats (pyCGM2.Processing.analysis.Analysis.kinematicStats.data) – data level

  • instance (of the kinematicStats or kineticStats attributes of an Analysis) –

  • context (str) – event context

pyCGM2.Processing.analysisHandler.getValues(analysisInstance, label, context)

return the values from a given ouput and its event context.

Parameters
pyCGM2.Processing.analysisHandler.isKeyExist(analysisInstance, label, context, exceptionMode=False)

check if the combinaison label/context exist in the analysis instance

Parameters
  • analysisInstance (pyCGM2.Processing.analysis.Analysis) – an analysis instance

  • label (str) – givel ouput label (eg LKneeAngles)

  • context (str) – event context

  • exceptionMode (bool) – enable exception raising

analysisProcessing

cycle

This module aims to construct a Cycles instance. Based on a builder pattern design, the Filter CyclesFilter calls a builder, ie CyclesBuilder or a GaitCyclesBuilder in the context of gait Analysis, then return a Cycles instance.

As attributes, the Cycles instance distinguished series of Cycle (or GaitCycle) instance according to computational objectives ( ie computation of spatio-temporal parameters, kinematics, kinetics or emg.)

class pyCGM2.Processing.cycle.Cycle(acq, startFrame, endFrame, context, enableFlag=True)

Generic Cycle

Parameters
  • acq (btk.Acquisituion) – an acquisition

  • startFrame (int) – start frame of the cycle

  • endFrame (double) – end frame of the cycle

  • enableFlag (bool) – flag to indicate the cycle will be use in further computation.

getAnalogTimeSequenceData(analogLabel)

Get analog data of the cycle

Parameters

analogLabel (str) – analog Label

getAnalogTimeSequenceDataNormalized(analogLabel)

Time-normalize an analog data

Parameters

analogLabel (str) – analog Label

getEvents(context='All')

Get all events of the cycle

Parameters

context (str) – event context (All, Left or Right)

getPointTimeSequenceData(pointLabel)

Get temporal point data of the cycle

Parameters

pointLabel (str) – point Label

getPointTimeSequenceDataNormalized(pointLabel)

Time-Normalise a point label

Parameters

pointLabel (str) – point Label

setEnableFlag(flag)

enable/disable the cycle

Parameters

flag (bool) – boolean flag

class pyCGM2.Processing.cycle.Cycles

Object to build from CycleFilter.

Cycles work as class-container. Its attribute members collect list of Cycle or GaitCycle according to computational objectives

Attributes are

  • spatioTemporalCycles: list of cycles uses for spatiotemporal parameter computation

  • kinematicCycles: list of cycles uses for kinematic computation

  • kineticCycles: list of cycles uses for kinetic computation

  • emgCycles: list of cycles uses for emg computation

class pyCGM2.Processing.cycle.CyclesBuilder(spatioTemporalAcqs=None, kinematicAcqs=None, kineticAcqs=None, emgAcqs=None)

Builder of generic cycles

Parameters
  • spatioTemporalAcqs (list) – acquisitions used for spatio-temporal parameter computation

  • kinematicAcqs (list) – acquisitions used for kinematics computation

  • kineticAcqs (list) – acquisitions used for kinetics computation

  • emgAcqs (list) – acquisitions used for emg computation

getEmg()

get the list of Cycle used for emg computation

getKinematics()

get the list of Cycle used for kinematic computation

getKinetics()

get the list of Cycle used for kinetic computation

getSpatioTemporal()

get the list of Cycle used for spatio-temporal parameter computation

class pyCGM2.Processing.cycle.CyclesFilter

Filter buiding a Cycles instance.

build()

Build a Cycles instance

setBuilder(builder)

Set the builder

Parameters

builder (pyCGM2.Processing.Cycle.(Builder)) – a concrete cycle builder

class pyCGM2.Processing.cycle.GaitCycle(gaitAcq, startFrame, endFrame, context, enableFlag=True)

Inherited class from Cycle defining a Gait cycle.

Parameters
  • acq (btk.Acquisituion) – an acquisition

  • startFrame (int) – start frame of the cycle

  • endFrame (double) – end frame of the cycle

  • enableFlag (bool) – flag to indicate the cycle will be use in further computation.

Notes

  • By default, X0 and Y0 are the longitudinal and lateral global axis respectively

  • GaitCycle construction computes spatio-temporal parameters automatically.

  • spatio-temporal parameters are :

    “duration”, “cadence”, “stanceDuration”, “stepDuration”, “doubleStance1Duration”, “doubleStance2Duration”, “simpleStanceDuration”, “stancePhase”, “swingDuration”, “swingPhase”, “doubleStance1”, “doubleStance2”, “simpleStance”, “stepPhase”, “strideLength”, “stepLength”, “strideWidth”, “speed”

getSpatioTemporalParameter(label)

Return a spatio-temporal parameter

Parameters

label (str) – label of the desired spatio-temporal parameter

class pyCGM2.Processing.cycle.GaitCyclesBuilder(spatioTemporalAcqs=None, kinematicAcqs=None, kineticAcqs=None, emgAcqs=None)

Builder of gait cycle

Parameters
  • spatioTemporalAcqs (list) – acquisitions used for spatio-temporal parameter computation

  • kinematicAcqs (list) – acquisitions used for kinematics computation

  • kineticAcqs (list) – acquisitions used for kinetics computation

  • emgAcqs (list) – acquisitions used for emg computation

getEmg()

get the list of Cycle used for emg computation

getKinematics()

get the list of Cycle used for kinematic computation

getKinetics()

get the list of Cycle used for kinetic computation

getSpatioTemporal()

get the list of Cycle used for spatio-temporal parameter computation

pyCGM2.Processing.cycle.analog_descriptiveStats(cycles, label, context)

Compute descriptive statistics of analog parameters from a cycles instance

Parameters
pyCGM2.Processing.cycle.construcGaitCycle(acq)

Construct gait cycle

Parameters

acq (btk.Acquisition) – an acquisition

pyCGM2.Processing.cycle.point_descriptiveStats(cycles, label, context)

Compute descriptive statistics of point parameters from a cycles instance

Parameters
pyCGM2.Processing.cycle.spatioTemporelParameter_descriptiveStats(cycles, label, context)

Compute descriptive statistics of spatio-temporal parameters from a cycles instance

Parameters

exporter

This module contains 2 classes (XlsAnalysisExportFilter and AnalysisExportFilter) for exporting an analysis instance in xls fomat and json respectively.

the class XlsExportDataFrameFilter is a generic filter for exporting Pandas.DataFrame in xls.

class pyCGM2.Processing.exporter.AnalysisExportFilter

Filter exporting an analysis instance as json.

export(outputName, path=None)

Export as json

Parameters
  • outputName (str) – filename without extension

  • path (str) – Path

setAnalysisInstance(analysisInstance)

set the analysis instance

Parameters

analysisInstance (pyCGM2.analysis.Analysis) – an analysis instance

class pyCGM2.Processing.exporter.XlsAnalysisExportFilter

Filter exporting an analysis instance as spreadheet.

Exported spreadsheet can organize either by row (Advanced mode) or column (basic mode). In Advanced mode, a row is made up of 101 columns representing a time normalized cycle.

export(outputName, path=None, excelFormat='xls', mode='Advanced')

Export spreadsheet

Parameters
  • outputName (str) – filename without extension

  • path (str) – Path

  • excelFormat (str) – format (xls,xlsx)

  • mode (str) – structure mode of the spreadsheet (Advanced,Basic)

setAnalysisInstance(analysisInstance)

set the analysis instance

Parameters

analysisInstance (pyCGM2.analysis.Analysis) – an analysis instance

class pyCGM2.Processing.exporter.XlsExportDataFrameFilter

Filter exporting a pandas.dataFrame or a list of pandas.dataFrame as xls spreadsheet(s)

export(outputName, path=None, excelFormat='xls')

Export spreadsheet

Parameters
  • outputName (str) – filename without extension

  • path (str) – Path

  • excelFormat (str) – format (xls,xlsx)

setDataFrames(dataframes)

Set the dataFrame

Parameters

dataframes (pandas.dataFrame or list) – dataframe or list of dataframe

c3dManager

c3dManagerFilters

This module aims to organize the c3d trials according to computational objectives, ie computation of spatio-temporal, kinematic, kinetics or emg parameters.

The implementation is based on a builder pattern. The filter C3dManagerFilter calls a procedure, then return a C3dManager instance, a ie , a structure listing both Btk.Acquisition instances and their associated filename according the computational objectives

c3dmanagerProcedure = c3dManagerProcedures.DistinctC3dSetProcedure(
    DATA_PATH, iPstFilenames, iKinematicFilenames, iKineticFilenames, iEmgFilenames)

cmf = c3dManagerFilters.C3dManagerFilter(c3dmanagerProcedure)
cmf.enableKinematic(True)
cmf.enableKinetic(True)
cmf.enableEmg(True)
trialManager = cmf.generate()
class pyCGM2.Processing.C3dManager.c3dManagerFilters.C3dManager

A c3d manager instance is a structure listing btk.Acquisition instances and the associated filenames for the 4 computational objectives (spatio-temporal, kinematic, kinetics or emg computation)

class pyCGM2.Processing.C3dManager.c3dManagerFilters.C3dManagerFilter(procedure)

pyCGM2 Filter used for disseminate c3d trial set(s)

Parameters

procedure (pyCGM2.Processing.C3dManager.c3dManagerProcedures.C3dManagerProcedure) – a C3dManagerProcedure instance

enableEmg(boolean)

enable emg computation

Parameters

boolean (bool) – boolean flag

enableKinematic(boolean)

enable kinematic computation

Parameters

boolean (bool) – boolean flag

enableKinetic(boolean)

enable kinetic computation

Parameters

boolean (bool) – boolean flag

enableSpatioTemporal(boolean)

enable spatio-temporal computation

Parameters

boolean (bool) – boolean flag

generate()

disseminate c3d trials according to the given Procedure

c3dManagerProcedures

This module gathers the procedures callable from the c3dManagerFilters

class pyCGM2.Processing.C3dManager.c3dManagerProcedures.DistinctC3dSetProcedure(data_path, stp_fileLst, kinematic_fileLst, kinetic_fileLst, emg_fileLst)

Distinct c3d sets are for each computational objectives

Parameters
  • data_path (str) – folder path

  • stp_fileLst (list) – c3d filenames for the spatioTemporal computation

  • kinematic_fileLst (list) – c3d filenames for the kinematic computation

  • kinetic_fileLst (list) – c3d filenames for the kinetics computation

  • emg_fileLst (list) – c3d filenames for the emg computation

generate(c3dManager, spatioTempFlag, kinematicFlag, kineticFlag, emgFlag)

disseminate c3d sets

Parameters
  • c3dManager (pyCGM2.Processing.c3dManager.C3dManager) – a c3dManager instance.

  • spatioTempFlag (bool) – enable populating the spatioTemporal attribute of the c3dManager instance

  • kinematicFlag (bool) – enable populating the kinematic attribute of the c3dManager instance

  • kineticFlag (bool) – enable populating the kinetic attribute of the c3dManager instance

  • emgFlag (bool) – enable populating the emg attribute of the c3dManager instance

class pyCGM2.Processing.C3dManager.c3dManagerProcedures.UniqueBtkAcqSetProcedure(data_path, fileLst, acqs)

the same combinaison (btk.Acquisition/c3d filenames) is used for all computational objectives

Parameters
  • data_path (str) – folder path

  • fileLst (list) – c3d filenames

  • acqs (list) – btk.Acquisition instances

Warning:

btk.Acquisition instances must match filenames. The first btk.acquisition instance must be the btk.acquisition from the first c3d filename.

generate(c3dManager, spatioTempFlag, kinematicFlag, kineticFlag, emgFlag)

disseminate the combinaison (btk.Acquisition/c3d filenames)

Parameters
  • c3dManager (pyCGM2.Processing.c3dManager.C3dManager) – a c3dManager instance.

  • spatioTempFlag (bool) – enable populating the spatioTemporal attribute of the c3dManager instance

  • kinematicFlag (bool) – enable populating the kinematic attribute of the c3dManager instance

  • kineticFlag (bool) – enable populating the kinetic attribute of the c3dManager instance

  • emgFlag (bool) – enable populating the emg attribute of the c3dManager instance

class pyCGM2.Processing.C3dManager.c3dManagerProcedures.UniqueC3dSetProcedure(data_path, fileLst)

the same c3d filenames is used for all computational objectives

Parameters
  • data_path (str) – folder path

  • fileLst (list) – c3d filenames

generate(c3dManager, spatioTempFlag, kinematicFlag, kineticFlag, emgFlag)

disseminate c3d filenames

Parameters
  • c3dManager (pyCGM2.Processing.c3dManager.C3dManager) – a c3dManager instance.

  • spatioTempFlag (bool) – enable populating the spatioTemporal attribute of the c3dManager instance

  • kinematicFlag (bool) – enable populating the kinematic attribute of the c3dManager instance

  • kineticFlag (bool) – enable populating the kinetic attribute of the c3dManager instance

  • emgFlag (bool) – enable populating the emg attribute of the c3dManager instance

Classification

classificationFilters

This module aims to classify the model ouputs according a gait pattern.

The implementation is based on a adapter pattern. The classication filter calls a procedure, then return the gait pattern for both limbs

example:

nds = normativeDatasets.NormativeData("Schwartz2008","Free")

procedure = classificationProcedures.PFKEprocedure(nds)
filt = classificationFilters.ClassificationFilter(analysisInstance, procedure)
sagClass = filt.run()
class pyCGM2.Processing.Classification.classificationFilters.ClassificationFilter(analysisInstance, procedure, pointSuffix=None)

Classification Filter

Parameters
  • analysis (pyCGM2.Processing.analysis.Analysis) – an analysis instance

  • procedure (pyCGM2.Processing.Classification.classificationProcedures.ClassificationProcedure) – a procedure instance

  • pointSuffix (str) – suffix added to model outputs.

run()

Run the filter

classificationProcedures

class pyCGM2.Processing.Classification.classificationProcedures.PFKEprocedure(normativeData, midStanceDefinition='PFKE', dataType='cycle', side='Both')

PlantarFlexor-KneeExtensor classification procedure defined by Sangeux et al 2015

Parameters
  • normativeData (pyCGM2.Report.normativeDatasets.NormativeData) – normative data instance

  • midStanceDefinition (str) – mid stance frame boundaries. Choice: PFKE (20,45), Perry (10,30) or Baker (10,50))

  • dataType (str) – chosen data type for classification. Choice cycle,mean,median.If cycle, knee and ankle scores are the median score from all cycle values with the normative mean value

  • side (str) – event context (Both,Left or Right)

Reference

  • Sangeux, Morgan; Rodda, Jill; Graham, H. Kerr (2015)

Sagittal gait patterns in cerebral palsy: the plantarflexor-knee extension couple index. In : Gait & posture, vol. 41, n° 2, p. 586–591. DOI: 10.1016/j.gaitpost.2014.12.019.

plot(analysis, title=None)

plot PFKE panels

Parameters

analysis (pyCGM2.Processing.analysis.Analysis) – an analysis instance

run(analysis, pointSuffix)

run the procedure

Parameters

DiscretePoints

discretePointFilters

A discrete point is a value at a specific frame of a cycle.

In this module, through the filter DiscretePointsFilter, the goal is to get series of discrete values extracted according a specific strategy (ie a procedure). For instance, the BenedettiProcedure extracts dicrete points recommanded in Benededdi et al (1998):

References:

Benedetti, M. G.; Catani, F.; Leardini, A.; Pignotti, E.; Giannini, S. (1998) Data management in gait analysis for clinical applications. In : Clinical biomechanics (Bristol, Avon), vol. 13, n° 3, p. 204–215. DOI: 10.1016/s0268-0033(97)00041-7.

class pyCGM2.Processing.DiscretePoints.discretePointFilters.DiscretePointsFilter(discretePointProcedure, analysis, modelInfo=None, subjInfo=None, condExpInfo=None)

Discrete point filter

Parameters
  • discretePointProcedure (pyCGM2.Processing.DiscrePoints.discretePointProcedures.DiscretePointProcedure) – a procedure

  • analysis (pyCGM2.Processing.analysis.Analysis) – an analysis instance

  • modelInfo (dict) – information about the model

  • subjInfo (dict) – information about the subject

  • condExpInfo (dict) – information about the experiment

getOutput()

get the output dataframe with all discrete values according to the procedure

setCondExpInf(condExpInfo)

Set experimental information

Parameters

condExpInfo (dict) – experimental information

setModelInfo(modelInfo)

Set model information

Parameters

modelInfo (dict) – model information

setSubjInfo(subjInfo)

Set subject information

Parameters

subjInfo (dict) – subject information

discretePointProcedures

class pyCGM2.Processing.DiscretePoints.discretePointProcedures.BenedettiProcedure(pointSuffix=None)

discrete points recommanded by benededdi et al(1998).

Parameters

pointSuffix (str) – suffix added to model ouputs

References:

Benedetti, M. G.; Catani, F.; Leardini, A.; Pignotti, E.; Giannini, S. (1998) Data management in gait analysis for clinical applications. In : Clinical biomechanics (Bristol, Avon), vol. 13, n° 3, p. 204–215. DOI: 10.1016/s0268-0033(97)00041-7.

detect(analysisInstance)

extract discrete points

Parameters

analysisInstance (pyCGM2.Processing.analysis.Analysis) – an analysis instance

class pyCGM2.Processing.DiscretePoints.discretePointProcedures.GoldbergProcedure(pointSuffix=None)

discrete points recommanded by Goldberg et al(1998).

Parameters

pointSuffix (str) – suffix added to model ouputs

References:

Goldberg, Saryn R.; Ounpuu, Sylvia; Arnold, Allison S.; Gage, James R.; Delp, Scott L. (2006) Kinematic and kinetic factors that correlate with improved knee flexion following treatment for stiff-knee gait. In : Journal of biomechanics, vol. 39, n° 4, p. 689–698. DOI: 10.1016/j.jbiomech.2005.01.015.

detect(analysisInstance)

extract discrete points

Parameters

analysisInstance (pyCGM2.Processing.analysis.Analysis) – an analysis instance

class pyCGM2.Processing.DiscretePoints.discretePointProcedures.MaxMinProcedure(pointSuffix=None)

extract extrema values.

Parameters

pointSuffix (str) – suffix added to model ouputs

detect(analysisInstance)

extract discrete points

Parameters

analysisInstance (pyCGM2.Processing.analysis.Analysis) – an analysis instance

JointPatterns

jointPatternFilters

class pyCGM2.Processing.JointPatterns.jointPatternFilters.JointPatternFilter(jointPatternProcedure, analysis)

jointPatternProcedures

ProgressionFrame

progressionFrameFilters

This module aims to detect the progression frame of a trial.

The filter ProgressionFrameFilter calls a procedure, and return the progression axis and a flag indicating the forward/backward progression.

class pyCGM2.Processing.ProgressionFrame.progressionFrameFilters.ProgressionFrameFilter(acq, progressionProcedure)

Progression Filter

Parameters
  • acq (btk.Acquisition) – an acquisition

  • progressionProcedure (pyCGM2.Processing.ProgressionFrame.progressionFrameProcedures.ProgressionFrameProcedure) – a procedure instance

compute()

run the filter

progressionFrameProcedures

class pyCGM2.Processing.ProgressionFrame.progressionFrameProcedures.PelvisProgressionFrameProcedure(marker='LASI', frontMarkers=['LASI', 'RASI'], backMarkers=['LPSI', 'RPSI'])

detect the progression from the trajectory of pelvic markers

Parameters
  • marker (str,Optional[LASI]) – marker label

  • frontMarkers (list,Optional["LASI","RASI"]) – anterior pelvic marker labels

  • backMarkers (list,Optional["LPSI","RPSI"]) – posterior pelvic markers labels

class pyCGM2.Processing.ProgressionFrame.progressionFrameProcedures.PointProgressionFrameProcedure(marker='LHEE')

detect the progression from the trajectory of a single marker

Parameters

marker (str,Optional[LHEE]) – marker label

class pyCGM2.Processing.ProgressionFrame.progressionFrameProcedures.ThoraxProgressionFrameProcedure(marker='CLAV', frontMarkers=['CLAV'], backMarkers=['C7'])

detect the progression from the trajectory of thoracic markers

Parameters
  • marker (str,Optional[CLAV]) – marker label

  • frontMarkers (list,Optional["CLAV"]) – anterior pelvic marker labels

  • backMarkers (list,Optional["C7"]) – posterior pelvic markers labels

Representative

representativeFilters

This module aims to detect a representative cycle

The filter RepresentativeCycleFilter calls a specific procedure, and return indexes of the representive cycle for the Left and right event contexts

class pyCGM2.Processing.Representative.representativeFilters.RepresentativeCycleFilter(analysisInstance, representativeProcedure)

Representative cycle filter

Parameters
  • analysisInstance (pyCGM2.Processing.analysis.Analysis) – an analysis instance.

  • representativeProcedure (pyCGM2.Processing.Representative.representativeProcedures.RepresentativeProcedure) – a procedure instance

run()

Run the filter

representativeProcedures

class pyCGM2.Processing.Representative.representativeProcedures.Sangeux2015Procedure

Representative detection method of Sangeux 2015

reference

Sangeux, Morgan A simple method to choose the most representative stride and detect outliers.

setData(EventContext, Label, indexes)

populate data

Parameters
  • EventContext (str) – event context

  • Label (str) – kinematic model output label

  • indexes (list) – axis indexes

```python

proc = Sangeux2015Procedure proc.setData(“Left”,”LHipAngles”,[0,2]) # 0:flexion and 2:transverse rotation

```

setDefaultData()

set default data according Sangeux 2015

Scores

scoreFilters

This module is dedicated to the quantification of a Score, i e a Global index caracterizing the movement performed

The filter ScoreFilter calls a specific procedure, and return scores values.

class pyCGM2.Processing.Scores.scoreFilters.ScoreFilter(scoreProcedure, analysis, normativeDataSet)

the score filter

Parameters

scoreProcedures

class pyCGM2.Processing.Scores.scoreProcedures.CGM1_GPS(pointSuffix=None)

Gait profile score accordin Baker et al. 2009

Parameters

pointSuffix (str,Optional[None]) – suffix added to model ouputs

Reference

Baker, Richard; McGinley, Jennifer L.; Schwartz, Michael H.; Beynon, Sarah; Rozumalski, Adam; Graham, H. Kerr; Tirosh, Oren (2009) The gait profile score and movement analysis profile. In : Gait & posture, vol. 30, n° 3, p. 265–269. DOI: 10.1016/j.gaitpost.2009.05.020.