pyomeca

pyomeca: An Open-Source Framework for Biomechanical Analysis - Published in JOSS (2020)

https://github.com/pyomeca/pyomeca

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 13 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    1 of 6 committers (16.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

biomechanics biomechanics-analysis dynamics kinematics kinetics python xarray

Scientific Fields

Earth and Environmental Sciences Physical Sciences - 83% confidence
Last synced: 4 months ago · JSON representation

Repository

Python toolbox for biomechanics analysis

Basic Info
  • Host: GitHub
  • Owner: pyomeca
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage: https://pyomeca.github.io/
  • Size: 13.1 MB
Statistics
  • Stars: 131
  • Watchers: 8
  • Forks: 33
  • Open Issues: 4
  • Releases: 11
Topics
biomechanics biomechanics-analysis dynamics kinematics kinetics python xarray
Created almost 8 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License

README.md

logo DOI badge Actions Status Coverage Status PyPI Downloads

Pyomeca is a python library allowing you to carry out a complete biomechanical analysis; in a simple, logical and concise way.

Pyomeca documentation

See Pyomeca's documentation site.

Example

Pyomeca implements specialized functionalities commonly used in biomechanics. As an example, let's process the electromyographic data contained in this c3d file.

You can follow along without installing anything by using our binder server: Binder

```python from pyomeca import Analogs

datapath = "../tests/data/markersanalogs.c3d" muscles = [ "Deltant", "Deltmed", "Deltpost", "Supra", "Infra", "Subscap", ] emg = Analogs.fromc3d(datapath, suffixdelimiter=".", usecols=muscles) emg.plot(x="time", col="channel", col_wrap=3) ```

svg

```python emgprocessed = ( emg.meca.bandpass(order=2, cutoff=[10, 425]) .meca.center() .meca.abs() .meca.low_pass(order=4, cutoff=5, freq=emg.rate) .meca.normalize() )

emgprocessed.plot(x="time", col="channel", colwrap=3) ```

svg

```python import matplotlib.pyplot as plt

fig, axes = plt.subplots(ncols=2, figsize=(10, 4))

emgprocessed.mean("channel").plot(ax=axes[0]) axes[0].settitle("Mean EMG activation")

emgprocessed.plot.hist(ax=axes[1], bins=50) axes[1].settitle("EMG activation distribution") ```

svg

See the documentation for more details and examples.

Features

  • Signal processing routine commonly used in biomechanics such as filters, normalization, onset detection, outliers detection, derivatives, etc.
  • Common matrix manipulation routines implemented such as getting Euler angles to/from a rototranslation matrix, creating a system of axes, setting a rotation or translation, transpose or inverse, etc.
  • Easy reading and writing interface to common files in biomechanics (c3d, csv, xlsx,mat, trc, sto, mot)
  • All of xarray's awesome features

The following illustration shows all of pyomeca's public API. An interactive version is available in the documentation.

api

Installation

Pyomeca itself is a pure Python package, but its dependencies are not. The easiest way to get everything installed is to use conda.

To install pyomeca with its recommended dependencies using the conda command line tool:

bash conda install -c conda-forge pyomeca

Now that you have installed pyomeca, you should be able to import it:

python import pyomeca

Integration with other modules

Pyomeca is designed to work well with other libraries that we have developed:

  • pyosim: interface between OpenSim and pyomeca to perform batch musculoskeletal analyses
  • ezc3d: Easy to use C3D reader/writer in C++, Python and Matlab
  • biorbd: C++ interface and add-ons to the Rigid Body Dynamics Library, with Python and Matlab binders.

Bug reports & questions

Pyomeca is Apache-licensed and the source code is available on GitHub. If any questions or issues come up as you use pyomeca, please get in touch via GitHub issues. We welcome any input, feedback, bug reports, and contributions.

Citing Pyomeca

DOI

If you use pyomeca in your academic work, please consider citing our paper as:

bibtex @article{Martinez2020, doi = {10.21105/joss.02431}, url = {https://doi.org/10.21105/joss.02431}, year = {2020}, publisher = {The Open Journal}, volume = {5}, number = {53}, pages = {2431}, author = {Romain Martinez and Benjamin Michaud and Mickael Begon}, title = {`pyomeca`: An Open-Source Framework for Biomechanical Analysis}, journal = {Journal of Open Source Software} }

Please consider citing the xarray project, which pyomeca is based on:

bibtex @article{jors-xarray, title = {Xarray: N-D labeled arrays and datasets in Python}, author = {Joe Hamman and Stephan Hoyer}, year = {2017}, journal = {Journal of Open Research Software} }

Contributors

Pyomeca is an open-source project created and supported by the S2M lab.

Owner

  • Name: pyomeca
  • Login: pyomeca
  • Kind: organization
  • Location: Montréal

Biomechanics library

JOSS Publication

pyomeca: An Open-Source Framework for Biomechanical Analysis
Published
September 03, 2020
Volume 5, Issue 53, Page 2431
Authors
Romain Martinez ORCID
School of Kinesiology and Exercise Science, Faculty of Medicine, University of Montreal, Canada
Benjamin Michaud ORCID
School of Kinesiology and Exercise Science, Faculty of Medicine, University of Montreal, Canada
Mickael Begon ORCID
School of Kinesiology and Exercise Science, Faculty of Medicine, University of Montreal, Canada
Editor
Kevin M. Moerman ORCID
Tags
python biomechanics electromyography kinematics dynamics

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 2
  • Watch event: 13
  • Issue comment event: 6
  • Push event: 3
  • Pull request review event: 2
  • Pull request event: 3
  • Fork event: 1
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 2
  • Watch event: 13
  • Issue comment event: 6
  • Push event: 3
  • Pull request review event: 2
  • Pull request event: 3
  • Fork event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 432
  • Total Committers: 6
  • Avg Commits per committer: 72.0
  • Development Distribution Score (DDS): 0.282
Past Year
  • Commits: 11
  • Committers: 3
  • Avg Commits per committer: 3.667
  • Development Distribution Score (DDS): 0.636
Top Committers
Name Email Commits
Romain Martinez m****s@g****m 310
Pariterre p****e@h****m 113
bernikr g****t@b****r 4
eve-mac e****1@u****a 3
d.kilic d****c@f****e 1
Kristen Thyng k****g@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 48
  • Total pull requests: 60
  • Average time to close issues: 3 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 22
  • Total pull request authors: 6
  • Average comments per issue: 2.81
  • Average comments per pull request: 2.07
  • Merged pull requests: 55
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: 1 day
  • Average time to close pull requests: 22 days
  • Issue authors: 1
  • Pull request authors: 3
  • Average comments per issue: 2.0
  • Average comments per pull request: 1.25
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • romainmartinez (13)
  • pariterre (6)
  • Dareczin (5)
  • jrdunga (2)
  • BKillen05 (2)
  • hasnaaouadoudibelabzioui (2)
  • SebastienCordillet (2)
  • mitkof6 (2)
  • mrrezaie (1)
  • marnunez (1)
  • Arevis13 (1)
  • anboen (1)
  • SoniaSong826 (1)
  • steakerlife (1)
  • bernikr (1)
Pull Request Authors
  • romainmartinez (33)
  • pariterre (23)
  • EveCharbie (3)
  • bernikr (2)
  • kthyng (1)
  • Kilidsch (1)
Top Labels
Issue Labels
enhancement (4) bug (2) help wanted (1) good first issue (1) question (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 198 last-month
  • Total docker downloads: 75
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 6
    (may contain duplicates)
  • Total versions: 11
  • Total maintainers: 1
pypi.org: pyomeca

pyomeca is a python library allowing to carry out a complete biomechanical analysis; in a simple, logical and concise way

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 198 Last month
  • Docker Downloads: 75
Rankings
Docker downloads count: 2.8%
Dependent packages count: 10.0%
Average: 22.9%
Dependent repos count: 56.1%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: pyomeca

Python toolbox for biomechanics analysis

  • Versions: 10
  • Dependent Packages: 2
  • Dependent Repositories: 6
Rankings
Dependent repos count: 13.8%
Dependent packages count: 19.6%
Average: 25.5%
Forks count: 34.1%
Stargazers count: 34.4%
Last synced: 4 months ago

Dependencies

requirements-dev.txt pypi
  • autoflake * development
  • black * development
  • bs4 * development
  • isort * development
  • jupyter * development
  • mkdocs * development
  • mkdocs-material * development
  • mkdocs-minify-plugin * development
  • mkdocstrings * development
  • pytest * development
  • pytest-cov * development
  • requests * development
.github/workflows/conda-package.yml actions
  • actions/checkout master composite
  • s-weigand/setup-conda v1 composite
.github/workflows/push_to_pypi.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
environment.yml pypi
pyproject.toml pypi
  • bottleneck *
  • ezc3d >= 1.3.2
  • matplotlib *
  • numpy *
  • openpyxl *
  • scipy *
  • xarray *