Skip to main content

Python package to extract gait analytic parameters for different kind of recordings (i.e. MOCAP, Force Plate)

Reason this release was yanked:

This version had some majos issues regaring gait metrics caluculation. Please use the conda version in the "DartLab-LLUI" channel

Project description

Gaitalytics Logo

This Python package provides a comprehensive set of tools and advanced algorithms for analyzing 3D motion capture data. It is specifically designed to process gait data stored in c3d format. Prior to utilizing the features of gaitalytics, it is necessary to perform data labeling, modeling, and filtering procedures.

The library’s versatility allows it to be adaptable to various marker sets and modeling algorithms, offering high configurability.

Current pre-release is only tested with data acquired with Motek Caren, HBM2 Lower Body Trunk and PIG.

Free software: MIT license

Functionalities

Event Detection

Method

Description

options

checked

Marker

Zenis 2006

  • min_distance = 100: minimum of frames between same event on same context

  • foot_strike_offset = 0: Amount of frames to offset foot strike

  • foot_off_offset = 0: Amount of frames to offset foot off

X

Forceplate

Split-Belt

Event Detection Check

Method

Description

options

checked

context

Checks gait event sequences HS->TO-HS-TO

spacing

Checks Frames between same event on same context

Modelling

Method

Description

options

checked

com

creates Center of Mass Marker

xcom

creates extrapolated Center of Mass Marker

  • belt_speed = 1 : speed of treadmill

  • dominant_leg_length = 0.1 : length of dominant leg (mm)

cmos

create Continuous Margin of Stability

Analysis

Method

Description

options

checked

angels

  • min

  • max

  • mean

  • sd

  • amplitude

  • min velocity

  • max velocity

  • sd velocity

  • by_phase = True If metrics should be calculated by standing and swinging phase

forces

  • min

  • max

  • mean

  • sd

  • amplitude

  • by_phase = True If metrics should be calculated by standing and swinging phase

moments

  • min

  • max

  • mean

  • sd

  • amplitude

  • by_phase = True If metrics should be calculated by standing and swinging phase

powers

  • min

  • max

  • mean

  • sd

  • amplitude

  • by_phase = True If metrics should be calculated by standing and swinging phase

cmos

  • min

  • max

  • mean

  • sd

  • amplitude

  • by_phase = True If metrics should be calculated by standing and swinging phase

mos

  • Mos at FS

  • Mos at TO

  • Mos at contra HS

Spatio-temporal

  • step_length

  • stride_length

  • cycle_duration

  • swing_duration_perc

  • stance_duration_perc

  • step_height

  • step_width

  • limb_circumduction [1]

  • single_support_duration_percent [2]

  • double_support_duration_percent [2]

X

Toe Clearance

  • minimal toe clearance

  • Percentage in cycle where minimal toe clearance happened

  • minimal toe clearance at FS

References

[1] Michael D. Lewek et al. (2012), “The influence of mechanically and physiologically imposed stiff-knee gait patterns on the energy cost of walking”, vol. 93, no.1, pp. 123-128. Publisher: Archives of Physical Medicine and Rehabilitation.

[2] A. Gouelle and F. Mégrot (2017), “Interpreting spatiotemporal parameters, symmetry, and variability in clinical gait analysis”, Handbook of Human Motion pp. 1-20, Publisher: Springer International Publishing.

Usage

Installation

Please be aware of the dependency of gaitalytics to Biomechanical-ToolKit (BTK). To install follow the instructions here or use conda-forge version here

Fast install with anaconda:

pip install gaitalytics
conda install -c conda-forge btk

You can also install the in-development version with:

pip install https://github.com/DART-Lab-LLUI/python-gaitalytics/archive/main.zip
conda install -c conda-forge btk

Configuration

Gaitalytics can be used with any marker set, which at least includes four hip markers (left front/back, right front/back) and four foot markers (left heel/toe, right heel/toe) and four ankle makers (left medial/lateral, right medial lateral).

All functionalities in the libraries only take points into account which are configured in as specific yaml file. Working example file can be found here

Minimal requirements would look like this:

marker_set_mapping:
  left_back_hip: LASIS
  right_back_hip: RASIS
  left_front_hip: LPSIS
  right_front_hip: RPSIS

  left_lat_malleoli: LLM
  right_lat_malleoli: RLM
  left_med_malleoli: LMM
  right_med_malleoli: RMM

  right_heel: RHEE
  left_heel: LHEE
  right_meta_2: RMT2
  left_meta_2: LMT2

  com: COM
  left_cmos: cmos_left
  right_cmos: cmos_right

model_mapping:

Warning Do not rename keys of the minimal setting

Pipeline

Please take the resources in the example folder for advice.

Documentation

https://python-gaitalytics.readthedocs.org

Development

To run all the tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows

set PYTEST_ADDOPTS=--cov-append
tox

Other

PYTEST_ADDOPTS=--cov-append tox

Release

https://github.com/ionelmc/cookiecutter-pylibrary

Changelog

0.0.0 (2024-02-09)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gaitalytics-0.1.2.tar.gz (85.5 kB view details)

Uploaded Source

Built Distribution

gaitalytics-0.1.2-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file gaitalytics-0.1.2.tar.gz.

File metadata

  • Download URL: gaitalytics-0.1.2.tar.gz
  • Upload date:
  • Size: 85.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for gaitalytics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9ded418881384c131bafc767421e19211a6e78d7d47c8af10b6c4fb5175120ad
MD5 76e0488f5e9d4abea7cab97476e0feb9
BLAKE2b-256 471dc45087deda2b3df8fa026e1715743936564f10370d116b3dbb3209a571f6

See more details on using hashes here.

File details

Details for the file gaitalytics-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gaitalytics-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for gaitalytics-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2718c8b75d5dc3d2fe84d00387009b4a6307eb4105bffe8de590f95d067a086e
MD5 75923eb0f4656123eae10b3bc7f668ce
BLAKE2b-256 5f2139c88fcb7a73082447cdfb41d8db805ba089a3fa77423f94584b22907337

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page