Table of Contents
Compute GPS and GDI
In this tutorial, we will walk through how to compute the Gait Profile Score (GPS) and Gait Deviation Index (GDI) using a Normal Database (ND) we derived in the previous tutorial.
Starting Point
If you do not have a Sift ND file generated, please follow the previous tutorial BEFORE completing this one: Build ND Tutorial
Supporting Files
Download here
- GPS_GDI_Joint_Angles.v3s - Visual3D Pipeline Script for GPS and GDI required Joint Angles
- GPS_GDI_TutND.cmz - If you wish to follow this tutorial with a premade Sift ND file, download the cmz file.
1. Load Library
- On the Load Page, select Load Library and navigate to the library of CMZ workspaces you wish to compute the GPS and/or GDI measure on.
- If following along from the previous building ND tutorial, you can load the same V3D Workshop data
2. Run External Script
Note: IF you have the correct kinematic joint angles for the GPS/GDI in your CMZ files, OR have just followed the build ND tutorial with the same data with the updated CMZ (i.e. you have not just redownloaded the V3D workshop data), you may skip step 2.
If we have loaded a library that does not have all of the 15 kinematic features necessary for the GPS and GDI, we need to make sure we have the correct joint angles computed in our CMZ workspaces. To do so, we are going to run a Visual3D pipeline script (.v3s file) against the loaded library.
Pipeline Script
The pipeline can be found here:
Note: this pipeline was derived for the sample workspace associated with this tutorial. If running this against your own data, make sure to verify the Link_Model_Based calculations with the GPS definitions to insure you have the correct angles.
A sample of this pipeline script can be seen here:
!///////////////////////////////////////////////////////////////////////////////////////////////// ! Compute LEFT Joint Angles !/////////////////////////////////////////////////////////////////////////////////////////////////
! Left Angles are calculated in accordance to the GPS score
! Left Ankle Compute_Model_Based_Data /RESULT_NAME=L_Ankle_Angle /SUBJECT_TAG=ALL_SUBJECTS /FUNCTION=JOINT_ANGLE /SEGMENT=LMF /REFERENCE_SEGMENT=LSK /RESOLUTION_COORDINATE_SYSTEM= ! /USE_CARDAN_SEQUENCE=FALSE ! /NORMALIZATION=FALSE ! /NORMALIZATION_METHOD= ! /NORMALIZATION_METRIC= ! /NEGATEX=FALSE ! /NEGATEY=FALSE ! /NEGATEZ=FALSE ! /AXIS1=X ! /AXIS2=Y ! /AXIS3=Z ! /TREADMILL_DATA=FALSE ! /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0) ! /TREADMILL_SPEED=0.0 ;
! Left Knee Compute_Model_Based_Data /RESULT_NAME=L_Knee_Angle /SUBJECT_TAG=ALL_SUBJECTS /FUNCTION=JOINT_ANGLE /SEGMENT=LSK /REFERENCE_SEGMENT=LTH /RESOLUTION_COORDINATE_SYSTEM= ! /USE_CARDAN_SEQUENCE=FALSE ! /NORMALIZATION=FALSE ! /NORMALIZATION_METHOD= ! /NORMALIZATION_METRIC= ! /NEGATEX=FALSE ! /NEGATEY=FALSE ! /NEGATEZ=FALSE ! /AXIS1=X ! /AXIS2=Y ! /AXIS3=Z ! /TREADMILL_DATA=FALSE ! /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0) ! /TREADMILL_SPEED=0.0 ;
Run V3D Engine Dialog
- Add the .v3s script downloaded from this tutorial and select “Run Scripts”.
- Wait for the CMZs to update and the library to re-load.
3. Load Sift ND
- On the Load Page, select Load ND and navigate to the Sift ND CMZ file generated in the previous tutorial, or your own Sift ND file.
- The Load Page should now display both the library data and ND data, like the image to the right of the page.
- The ND also has a Mean summary statistic signal for both Workspace and Library level. Both workspace means and the library mean are REQUIRED for the GDI measure. The Library level mean signal is REQUIRED for the GPS.
- Note that the ND and loaded library in this particular example are from the same underlying database. This DOES NOT need to be the case to follow this tutorial if using your own data.
IF your Sift ND file does not follow these requirements, please follow the previous tutorial here to build a ND with the correct summary data.
4. Compute Gait Score
Run Compute GPS
- Select Compute GPS to bring up the GPS Dialog
- Change the Normal Database Type to “Sift ND File”
- This should automatically populate the ND File with the path of the loaded ND
- Select the Signal Folder, events to normalize to for left and right side, and number of normalized points. Here we are sticking to the default LHS, RHS, and 51 points, aligning with the GPS definition.
- Click on “Signal Selection” to open the second GPS Dialog
- Select the signals from the loaded library (Signal column) with the components that correspond to the kinematic measure (Signal Name column)
- Select the signals in the normal database (Matching L/R ND Signal column) that also corresponds to the kinematic measure. Note that there is no component selection for the ND signals… this is because we created the ND using signals from query groups in Sift, which already had specific components selected. It is assumed that this is the case for any ND file loaded.
- Review your selections and hit “Accept”
- Select “Compute GPS”
- The CMZ's will update and the GPS queries will be automatically loaded into the Explore Page
- The results of the GPS are saved in the METRIC data type of the Visual3D data tree. If you wish to query the GPS signals again in the future, you can find them in Folder GPS1. You can also query the GVS values for each component in folders GVS_L_1 and GVS_R_1. The “1” indicates that this is the first GPS measure in these files. If you compute the GPS again on this dataset with a different ND or different settings, the results will not be overwritten.
Run Compute GDI
- Select Compute GDI to bring up the GDI Dialog
- Sift should automatically populate the ND File with the path of the loaded ND
- Select the Signal Folder, events to normalize to for left and right side, and number of normalized points. Here we are sticking to the default LHS, RHS, and 51 points, aligning with the GPS definition.
- Click on “Signal Selection” to open the second GDI Dialog
- Select the signals from the loaded library (Signal column) with the components that correspond to the kinematic measure (Signal Name column)
- Select the signals in the normal database (Matching L/R ND Signal column) that also corresponds to the kinematic measure. Note that there is no component selection for the ND signals… this is because we created the ND using signals from query groups in Sift, which already had specific components selected. It is assumed that this is the case for any ND file loaded.
- Review your selections and hit “Accept”
- Select “Compute GDI”
- The CMZ's will update and the GDI queries will be automatically loaded into the Explore Page
- The results of the GDI are saved in the METRIC data type of the Visual3D data tree. If you wish to query the GPS signals again in the future, you can find them in Folder GDI1. The “1” indicates that this is the first GPS measure in these files. If you compute the GPS again on this dataset with a different ND or different settings, the results will not be overwritten.
5. Visualize Results
- Navigate to the Explore Page and change the plot type to “Metric Plot”
- Plot the GPS1 and/or GDI1 groups with all or select workspaces
- Select “Plot Workspace Mean” and group by Workspace
- Now we can visualize the GPS and GDI measures within Sift
6. Exporting Results
- GPS/GDI results can be exported via Sift's Export Results Dialog
- Here we can export the plotted data to a text file to save our results
- We can also export the graph of the results via Sift's Export Graphs Dialog