Code Monkey home page Code Monkey logo

pyomeca's Introduction

Pyomeca

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

Status

Continuous integration (Linux) Build Status
Continuous integration (Windows) Build status
Code coverage codecov
Code quality Codacy Badge
Last release Anaconda-Server Badge
Installation Anaconda-Server Badge

Pyomeca documentation

See pyomeca's documentation site (under construction and not usable yet), as well as pyomeca's tutorial notebooks.

Example

Here is an example of a complete EMG pipeline in just one command:

from pyomeca import Analogs3d

emg = (
    Analogs3d.from_c3d("path/to/your/c3d.c3d", names=['anterior_deltoid', 'biceps'])
    .band_pass(freq=2000, order=4, cutoff=[10, 425])
    .center()
    .rectify()
    .low_pass(freq=2000, order=4, cutoff=5)
    .normalization()
    .time_normalization()
)

Features

  • Object-oriented architecture where each class is associated with common and specialized functionalities:

  • Markers3d: 3d markers positions

  • Analogs3d: analogs (emg, force or any analog signal)

  • GeneralizedCoordinate: generalized coordinate (joint angle)

  • RotoTrans: roto-translation matrix

  • Specialized functionalities include signal processing routine commonly used in biomechanics: filters, normalization, onset detection, outliers detection, derivative, etc.

  • Each functionality can be chained. In addition to making it easier to write and read code, it allows you to add and remove analysis steps easily (such as Lego blocks).

  • Each class inherits from a numpy array, so you can create your own analysis step easily.

  • Easy reading and writing interface to common files in biomechanics:

    • c3d (binary file used in biomechanics): from_c3d and to_c3d
    • csv: from_csv and to_csv
    • mat (MATLAB file): from_mat and to_mat
    • sto (OpenSim storage file): to_sto (must install pyosim)
    • trc (OpenSim markers position file): to_trc (must install pyosim)
  • Common linear algebra routine implemented: get Euler angles to/from roto-translation matrix, create a system of axes, set a rotation or translation, transpose or inverse, etc.

Installation

Using Conda

First, install miniconda or anaconda. Then type:

conda install pyomeca -c conda-forge

Using pip

First, you need to install python, swig and numpy. Then, follow the instructions to compile ezc3d. Finally, install pyomeca with pip install git+https://github.com/pyomeca/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.
  • pyoviz: pyomeca visualization toolkit and GUIs (still in development and not usable yet)

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.

pyomeca's People

Contributors

romainmartinez avatar pariterre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.