How To Use JMP
Check that you have all the necessary inputs
Scaled OpenSim Model
You will need to have an OpenSim model matching the JMP model requirements that has been scaled to match your specific subject. For best practices on model scaling for the NMSM Pipeline, see here
.trc marker data file
You will need experimental motion data for this tool. Make sure that you have data on the joints of interest throughout their full range of motion, or at least the full range of motion that is relevant to your study.
Create your XML settings file and modify necessary parameters
You can create a JMP settings file using the NMSM Pipeline GUI plugin in OpenSim. Alternatively, you may use the JMPReference to build a settings file from scratch. This file contains an exhaustive list of all JMP settings file elements.
Create your MATLAB file to run JMP
You may now create a MATLAB script to run JMP. This file should call the function JointModelPersonalizationTool("settingsFileName.xml")
Make sure that your MATLAB parallel computing toolbox is configured to use a "processes" profile.
Make sure the nmsm-core project is running in MATLAB
If it is not already running, double click on ‘Project.prj’ in the root of the nmsm-core folder to open it up.
Press run in MATLAB
Analyze your results
The key output to a JMP optimization is a new .osim file with adjusted joint parameters. This .osim file should be used for all subsequent steps.
You can visualize inverse kinematics marker errors before and after JMP using the function plotJmpResultsFromSettingsFile("settingsFileName.xml", ["extraMarkerFile1.trc", "extraMarkerFile2.trc"]). This function runs inverse kinematics on the marker files included in your JMP tasks using the pre- and post-JMP models. You may also include extra marker files to plot marker errors for. The task specific plots only include markers that were included in that task, but plots for extra marker files include all markers used in the JMP run across all tasks. This function also saves the marker errors to files inside a directory named MarkerErrors
It is also recommended that you visualize your results in the OpenSim GUI. This allows you to diagnose if JMP produced non-anatomic results.
For more detail on how to use JMP, visit the hands-on JMP Tutorial.