Skip to main content

easy gait-metrics for everyone

Project description

docs

Documentation Status

tests

GitHub Actions Build Status

package

PyPI - Downloads Conda Downloads

development

GitHub License GitHub last commit Commits since latest release Pixi Badge

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.

Quickstart

Installation

Fast install with anaconda:

conda install gaitalytics -c DartLab-LLUI

Or with pip:

pip install gaitalytics

Configuration

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

Additionally markers can be defined on which standard time-series features such as min max mean etc. will be calculated.

All functionalities in the libraries only take points into account which are configured in as specific yaml file.

Minimal requirements would look like this:

analysis:
  markers:
    - "LHipAngles"
    - "LKneeAngles"
    - "LAnkleAngles"
    - "LPelvisAngles"
    - "LThoraxAngles"
mapping:
  markers:
    # Foot
    l_heel: "LHEE"
    r_heel: "RHEE"
    l_toe: "LTOE"
    r_toe: "RTOE"

    # Hip
    l_ant_hip: "LASI"
    r_ant_hip: "RASI"
    l_post_hip: "LPSI"
    r_post_hip: "RPSI"
    sacrum: "SACR"

Simple Pipeline

from gaitalytics import api
# Load configuration (yaml file from above)
config = api.load_config("./pig_config.yaml")

# Load trial from c3d file
trial = api.load_c3d_trial("./test_small.c3d", config)

# Detect events
events = api.detect_events(trial, config)
try:
    # check events
    api.check_events(events)

    # write events to c3d in the same file
    api.write_events_to_c3d("./test_small.c3d", events, './test.c3d')

    # add events to trial
    trial.events = events

    # segment trial to gait cycles. (Events are already existing in the c3d file)
    trial_segmented = api.segment_trial(trial)

    # calculate features
    features = api.calculate_features(trial_segmented, config)

    # normalise time
    trial_normalized = api.time_normalise_trial(trial_segmented)

    # save features
    features.to_netcdf("features.nc")

    # export segmented trial to netcdf
    api.export_trial(trial_segmented, "output_segments")
    api.export_trial(trial_normalized, "output_norm")

except ValueError as e:
    print(e)

Documentation

https://python-gaitalytics.readthedocs.org

https://github.com/DART-Lab-LLUI/python-gaitalytics

https://pypi.org/project/gaitalytics/

https://anaconda.org/dartlab-llui/gaitalytics

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.2.2.tar.gz (5.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gaitalytics-0.2.2-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gaitalytics-0.2.2.tar.gz
  • Upload date:
  • Size: 5.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for gaitalytics-0.2.2.tar.gz
Algorithm Hash digest
SHA256 02fa69ade972c3d94c29796a090da7aa052d911d704184e732045c27f8a9409d
MD5 027da33923494a4b12b79b4be381e63c
BLAKE2b-256 60c60fa57b48facab7ca500827da4d136814640c78d967f5ccac9c614916aca9

See more details on using hashes here.

Provenance

The following attestation bundles were made for gaitalytics-0.2.2.tar.gz:

Publisher: publish-to-test-pypi.yml on DART-Lab-LLUI/python-gaitalytics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: gaitalytics-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for gaitalytics-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e45698fd0a29e455b7a00255299da591d219744d6a6600e426d7674f4cc8021e
MD5 5e69cca9f4db65eb838794a1e5b80ab0
BLAKE2b-256 42c3d844cd387586c71fd15c3e2ecb1ba48c446bd8131d5ee02af96b469b4722

See more details on using hashes here.

Provenance

The following attestation bundles were made for gaitalytics-0.2.2-py3-none-any.whl:

Publisher: publish-to-test-pypi.yml on DART-Lab-LLUI/python-gaitalytics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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