Skip to content


Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time


Read the published manuscript in the Journal of Open Source Software:

dryft is an open-source Python package that corrects running ground reaction force (GRF) signal drift. This package was developed for biomechanical researchers using force plates or a force-measuring treadmill to collect an individual's GRF during running, but should work for split-belt treadmill walking as well. Due to the prevalence of MATLAB in the field of Biomechanics, I have also developed a set of MATLAB functions that operate like the Python package. However, this readme will focus on the use of the Python package.

Table of Contents


This package was designed to work with and was tested with Python 3.6.7. Other python 3.X versions may be supported, provided dependency compatibilities and requirements are met.

The package requires the following dependencies:

  • numpy
  • pandas (0.24.0 or newer)
  • matplotlib
  • scipy


Using virtualenv

On Windows:

git clone
pip install virtualenv
python -m venv dryft-env
cd dryft
python install

On macOS or Linux:

git clone
pip install virtualenv
python -m venv dryft-env
source dryft-env/bin/activate
cd dryft
python install

Using pip:

git clone
cd dryft
pip install -r requirements.txt

Using Anaconda

You can use Anaconda to setup a Python 3.6.7 environment to use this package. If you wish to setup a new environment, an Anaconda environment file is included to automatically install most dependencies. You can create/activate an anaconda environment and download dependencies using the Anaconda Prompt:

git clone
cd dryft
conda env create -f path\to\environment.yml
conda activate dryft-env
python install

How dryft Works

Running is generally characterized by two phases: a stance and aerial phase. Only one foot is on the ground at a time during stance phase and both feet are off the ground during aerial phase. The force exerted by the body on the ground during aerial phase is zero and during stance phase it is greater than zero. If drift is present in the force signal, values during the aerial phase will no longer be zero. First, `dryft` calculates the force occurring during each aerial phase of a continuous running trial. Then these aerial phase values are interpolated to the length of the trial using a 3rd order spline fill. Lastly, the interpolated values, which represents the signal drift over time, are subtracted from the original trial. This effectively corrects for signal drift.

Another method of correcting drift is described by Paolini et al. (2007), where the mean force measured during the aerial phase is subtracted from the following stance phase. The success of this approach is highly dependent upon the method of identifying aerial phases in the vertical ground reaction force signal. If a force threshold is used to define the boundaries of each aerial phase, parts of the neighboring stance phases may be included in the calculation of the mean (left panel in the figure above). Additionally, this approach assumes no change in drift over the duration of a stance phase. The dryft package uses the force measured at the middle of each aerial phase and spline interpolates between them to correct signal drift. This approach differs from the method described by Paolini et al. (2007) and currently available drift correction methods which can only account for linear drift or a constant offset

Using dryft


Running the following from the command line will automatically test the installation of dryft:

python -m dryft.sample.test


A notebook of dryft.sample.test is available here as a tutorial.


Please refer to the documentation page


To report an problem with dryft, please create a new issue.

Contact alcantarar with any support or general questions about dryft. I also welcome meaningful contributions via pull requests.


This package is licensed under the MIT License. Copyright 2019 Ryan Alcantara.