Analysis#
- class pyCGM2.Processing.analysis.Analysis#
A class-container for storing analysis data including descriptive statistics of various biomechanical parameters.
- stpStats#
Descriptive statistics of spatiotemporal parameters.
- Type:
dict
- kinematicStats#
Descriptive statistics of kinematics data.
- Type:
- kineticStats#
Descriptive statistics of kinetics data.
- Type:
- emgStats#
Descriptive statistics of EMG data.
- Type:
- muscleGeometryStats#
Descriptive statistics of muscle geometry data.
- Type:
- muscleDynamicStats#
Descriptive statistics of muscle dynamics data.
- Type:
- gps#
Gait Profile Score (GPS) data.
- Type:
Optional[dict]
- gvs#
Gait Variable Score (GVS) data.
- Type:
Optional[dict]
- coactivations#
Coactivation data for muscle pairs.
- Type:
dict
- subjectInfo#
Information about the subject.
- Type:
Optional[dict]
- experimentalInfo#
Information about the experiment.
- Type:
Optional[dict]
- modelInfo#
Information about the biomechanical model used.
- Type:
Optional[dict]
- emgInfo#
Additional information about EMG data.
- Type:
Optional[dict]
- kinematicInfo#
Additional information about kinematic data.
- Type:
Optional[dict]
- kineticInfo#
Additional information about kinetic data.
- Type:
Optional[dict]
- stpInfo#
Additional information about spatiotemporal parameters.
- Type:
Optional[dict]
- scoreInfo#
Additional information about scores.
- Type:
Optional[dict]
- muscleGeometryInfo#
Additional information about muscle geometry.
- Type:
dict
- muscleDynamicInfo#
Additional information about muscle dynamics.
- Type:
dict
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)
- __init__()#
Methods
__init__
()Get the number of kinematic cycles for the left and right contexts.
setCoactivation
(labelEmg1, labelEmg2, ...)Set coactivation data for a pair of muscles in a specific context.
setEmg
(data[, pst])Set EMG data.
setEmgInfo
(iDict)Set additional information about EMG data.
setExperimentalInfo
(experDict)Set experimental information.
setGps
(GpsStatsOverall, GpsStatsContext)Set Gait Profile Score (GPS) data.
setGvs
(gvsStats)Set Gait Variable Score (GVS) data.
setKinematic
(data[, pst])Set kinematic data.
setKinematicInfo
(iDict)Set additional information about kinematic data.
setKinetic
(data[, pst, optionalData])Set kinetic data.
setKineticInfo
(iDict)Set additional information about kinetic data.
setModelInfo
(modelDict)Set model information.
setMuscleDynamicInfo
(iDict)Set additional information about muscle dynamics.
setMuscleGeometry
(data[, pst])Set muscle geometry data.
setMuscleGeometryInfo
(iDict)Set additional information about muscle geometry.
setScoreInfo
(iDict)Set additional information about scores.
setStp
(inDict)Set spatiotemporal parameters.
setStpInfo
(iDict)Set additional information about spatiotemporal parameters.
setSubjectInfo
(subjectDict)Set subject information.
- getKinematicCycleNumbers() Tuple[int, int] #
Get the number of kinematic cycles for the left and right contexts.
- Returns:
Tuple[int, int] – Tuple containing the number of left and right kinematic cycles.
- setCoactivation(labelEmg1: str, labelEmg2: str, context: str, res: Dict)#
Set coactivation data for a pair of muscles in a specific context.
- Parameters:
labelEmg1 (str) – First EMG label.
labelEmg2 (str) – Second EMG label.
context (str) – Context of coactivation (e.g., ‘Left’, ‘Right’).
res (Dict) – Dictionary containing coactivation results.
- setEmg(data: Dict, pst: Dict = {})#
Set EMG data.
- Parameters:
data (Dict) – EMG data.
pst (Dict) – Spatiotemporal parameters associated with EMG data.
- setEmgInfo(iDict: Dict)#
Set additional information about EMG data.
- Parameters:
iDict (Dict) – Dictionary containing additional EMG information.
- setExperimentalInfo(experDict: Dict)#
Set experimental information.
- Parameters:
experDict (Dict) – Dictionary containing experimental information.
- setGps(GpsStatsOverall: Dict, GpsStatsContext: Dict)#
Set Gait Profile Score (GPS) data.
- Parameters:
GpsStatsOverall (Dict) – Overall GPS data.
GpsStatsContext (Dict) – GPS data by context (e.g., left, right).
- setGvs(gvsStats: Dict)#
Set Gait Variable Score (GVS) data.
- Parameters:
gvsStats (Dict) – GVS data.
- setKinematic(data: Dict, pst: Dict = {})#
Set kinematic data.
- Parameters:
data (Dict) – Kinematic data.
pst (Dict) – Spatiotemporal parameters associated with kinematic data.
- setKinematicInfo(iDict: Dict)#
Set additional information about kinematic data.
- Parameters:
iDict (Dict) – Dictionary containing additional kinematic information.
- setKinetic(data: Dict, pst: Dict = {}, optionalData: Dict = {})#
Set kinetic data.
- Parameters:
data (Dict) – Kinetic data.
pst (Dict) – Spatiotemporal parameters associated with kinetic data.
optionalData (Dict) – Optional additional kinetic data.
- setKineticInfo(iDict: Dict)#
Set additional information about kinetic data.
- Parameters:
iDict (Dict) – Dictionary containing additional kinetic information.
- setModelInfo(modelDict: Dict)#
Set model information.
- Parameters:
modelDict (Dict) – Dictionary containing biomechanical model information.
- setMuscleDynamicInfo(iDict: Dict)#
Set additional information about muscle dynamics.
- Parameters:
iDict (Dict) – Dictionary containing additional muscle dynamics information.
- setMuscleGeometry(data: Dict, pst: Dict = {})#
Set muscle geometry data.
- Parameters:
data (Dict) – Muscle geometry data.
pst (Dict) – Spatiotemporal parameters associated with muscle geometry data.
- setMuscleGeometryInfo(iDict: Dict)#
Set additional information about muscle geometry.
- Parameters:
iDict (Dict) – Dictionary containing additional muscle geometry information.
- setScoreInfo(iDict: Dict)#
Set additional information about scores.
- Parameters:
iDict (Dict) – Dictionary containing additional scoring information.
- setStp(inDict: Dict)#
Set spatiotemporal parameters.
- Parameters:
inDict (Dict) – Dictionary of spatiotemporal parameters.
- setStpInfo(iDict: Dict)#
Set additional information about spatiotemporal parameters.
- Parameters:
iDict (Dict) – Dictionary containing additional spatiotemporal information.
- setSubjectInfo(subjectDict: Dict)#
Set subject information.
- Parameters:
subjectDict (Dict) – Dictionary containing subject information.