easy gait-metrics for everyone
Project description
docs |
|
|---|---|
tests |
|
package |
|
development |
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 for 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gaitalytics-0.2.1.post1.tar.gz.
File metadata
- Download URL: gaitalytics-0.2.1.post1.tar.gz
- Upload date:
- Size: 5.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45c7b58fbf7396640652b2385c8f6175056f5bf2e49a6bc5d71948ccf9882c8f
|
|
| MD5 |
72f28a1b5dfa5200bc90fbbad69620d3
|
|
| BLAKE2b-256 |
faa05a8cd46c21d8488482286b1ce96227b9a55c9999a01ebdaf0c61da35e1df
|
Provenance
The following attestation bundles were made for gaitalytics-0.2.1.post1.tar.gz:
Publisher:
publish-to-test-pypi.yml on DART-Lab-LLUI/python-gaitalytics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gaitalytics-0.2.1.post1.tar.gz -
Subject digest:
45c7b58fbf7396640652b2385c8f6175056f5bf2e49a6bc5d71948ccf9882c8f - Sigstore transparency entry: 153045345
- Sigstore integration time:
-
Permalink:
DART-Lab-LLUI/python-gaitalytics@27d5c663e72cd48603f0b9b02046a945c0cca0a1 -
Branch / Tag:
refs/tags/0.2.1.post1 - Owner: https://github.com/DART-Lab-LLUI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-test-pypi.yml@27d5c663e72cd48603f0b9b02046a945c0cca0a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gaitalytics-0.2.1.post1-py3-none-any.whl.
File metadata
- Download URL: gaitalytics-0.2.1.post1-py3-none-any.whl
- Upload date:
- Size: 31.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79b64777a1e47c7c242d0740242110e507f72c44019b5a052d7e0250a3bc2e71
|
|
| MD5 |
cc08c683cde58370a407a1ee271452f4
|
|
| BLAKE2b-256 |
e86dfa408ecfc47794a276c7b6861cab275a6006077667d898cc5e99fb09a1ba
|
Provenance
The following attestation bundles were made for gaitalytics-0.2.1.post1-py3-none-any.whl:
Publisher:
publish-to-test-pypi.yml on DART-Lab-LLUI/python-gaitalytics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gaitalytics-0.2.1.post1-py3-none-any.whl -
Subject digest:
79b64777a1e47c7c242d0740242110e507f72c44019b5a052d7e0250a3bc2e71 - Sigstore transparency entry: 153045348
- Sigstore integration time:
-
Permalink:
DART-Lab-LLUI/python-gaitalytics@27d5c663e72cd48603f0b9b02046a945c0cca0a1 -
Branch / Tag:
refs/tags/0.2.1.post1 - Owner: https://github.com/DART-Lab-LLUI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-test-pypi.yml@27d5c663e72cd48603f0b9b02046a945c0cca0a1 -
Trigger Event:
push
-
Statement type: