openOFM
Code repository for the openOFM project. See the manuscript below for full mathematical details and further instructions:
Dixon, P. C., Drew, E. E., McBride, S. P., Harrington, M., Stebbins, J., & Zavatsky, A. B. (2025). OpenOFM: an open-source implementation of the multi-segment Oxford Foot Model. Computer Methods in Biomechanics and Biomedical Engineering, 1-14. https://doi.org/10.1080/10255842.2024.2448558
Overview
openOFM is an open-source toolbox for computation of multi-segment foot biomechanics according to the Oxford Foot Model.
There are 2 ways to access/interact with the toolbox:
- Install as a python package using pip (see Installing the openOFM Python package)
- Clone/download the repository directly from github: https://github.com/mcgillmotionlab/openOFM
Note: Approach 2 provides access to both Python and Matlab versions of the toolbox
Installing the openOFM Python package
openOFM is now on pypi.org, install in your environment/version of choice:
- Install the latest stable version:
pip install openofm - Install a specific version
pip install openofm==1.0.0 - Upgrade your installation to the latest version
pip install --upgrade openofm
Running the openOFM Python scripts
Users may run the Python scripts using two main approaches.
First, users may run the openOFM_static.py and openOFM_dynamic.py
files directly (also used by Nexus). Running these files without any arguments
will default to processing the data within the Data_Sample folder for version
1.0. Users may append additional flags to modify settings. For example, the
following command allows users to process a static trial using version 1.1 and
the subject parameters defined in a settings.yml file:
python openOFM_static.py --version 1.1 --use_settings
When processing data through the openOFM static or openOFM dynamic pipelines, the following arguments can be used:
versioncan be set to “1.0” or “1.1”.data_diris the name of subject folder relative to the rootfile_nameis the name of the .c3d to processuse_settingscontrols whether to use the subject parameters and processing settings from a .c3d file or a settings.yml file defined by the usermake_plot(openOFM_dynamic.pyonly). Allows users to generate a plot of results.
Options can be reviewed via the command: python openOFM_static.py --h
and python openOFM_dynamic.py --h
Second, users may run the openOFM_sample_process.py. This approach
may be more appropriate for users/developers wishing to integrate openOFM
into their analysis or modify computations.
Validating the openOFM code
An additional openOFM_validate.py script compares openOFM python
(version 1.0) and Vicon implementations using the sample data provided.
Running this script will display OFM kinematics for both implementations.
Environment setup
Python users must set up an appropriate environment to run openOFM. The following steps assume the user has installed the Anaconda or Mini- conda python distribution and has launched a terminal (Mac OS/Linux) or command prompt (PC). Similar commands can be run via Python IDEs.
- Create environment:
conda create --name openOFM python=3.11 -y - Activate environment:
conda activate openOFM - Change directory to python subdirectory of the openOFM repository:
cd ...\openOFM\python - Install packages:
conda install --y --file requirements.txt - If the ezc3d package does not install, add conda-forge to channels before
trying step 4 again:
conda config --add channels conda-forge
Running in Matlab
Although officially unsupported, the openOFM is available for use in Matlab. The following steps assume Matlab is installed with a valid lincense:
- Download the openOFM repository to a location of your choice
- Change the working directory to the Matlab subfolder of the repository
- Add the Matlab folder and its subfolders to the Matlab path
- Run the
openOFM process.moropenOFM_validate.mscript
openOFM process.m
- Set the desired version ’1.0’ or ’1.1’ on line 8
- If anthropometric measures are missing from the .c3d files, set set- tings.manualAnthro (line 9) to True, and add the measure to section 2.2 (line 30)
- Select subject folder when prompted, for example MA 00 in folder
Data Sample
Note, the openOFM_process.m should be modified for use with a user’s own
data as it defaults to running version 1.1 on the Data_Sample participant
with placeholder values in the settings.
Installing a dev environment
- conda create -n openOFM-dev python=3.11
- conda activate openOFM-dev
- cd openOFM root folder of the repository
- install the dev dependencies from the pyoproject.toml file:
pip install -e ".[dev]"
Citation
If openOFM was useful to you, please cite our work: Dixon, P. C., Drew, E. E., McBride, S. P., Harrington, M., Stebbins, J., & Zavatsky, A. B. (2025). OpenOFM: an open-source implementation of the multi-segment Oxford Foot Model. Computer Methods in Biomechanics and Biomedical Engineering, 1-14. https://doi.org/10.1080/10255842.2024.2448558
Metadata
Release files for openofm 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openofm-1.1.3.tar.gz | 10.5 MB | Without provenance | Details for openofm-1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openofm-1.1.3-py3-none-any.whl | Python 3 | none | any | Details for openofm-1.1.3-py3-none-any.whl |
Total release size: 10.5 MB
Release files / openofm-1.1.3.tar.gz
| Download URL | openofm-1.1.3.tar.gz |
|---|---|
| Size | 10.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c96f5d0a5d245fda68634080d4b11b3828acf0ee4fa2c306b5400ec5ec7383ad
|
|
BLAKE2b-256 checksum How to use checksums |
6afbf96a36f4a331b12dab26fdc96760b07036083395e1cb12e7e4fe775aeed5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / openofm-1.1.3-py3-none-any.whl
| Download URL | openofm-1.1.3-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5e5a12f4563a4981d578ad48d087e31c53257cec579aecb2a2bfa248d0986d4
|
|
BLAKE2b-256 checksum How to use checksums |
2664ec7af1e2ef44343b7a8c31f42d496fd21d6dfed590fc91259b4b06bf954f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Security for openofm 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.