GithubHelp home page GithubHelp logo

bmclab / bmc Goto Github PK

View Code? Open in Web Editor NEW
418.0 55.0 262.0 320.88 MB

Notes on Scientific Computing for Biomechanics and Motor Control

Home Page: https://bmclab.github.io/BMC/

License: Creative Commons Attribution 4.0 International

Python 1.13% Jupyter Notebook 98.87%
biomechanics biomedical-engineering motor-control jupyter-notebook python scientific-computing

bmc's Introduction

Notes on Scientific Computing for Biomechanics and Motor Control

This repository is a collection of lecture notes and code on scientific computing and data analysis for Biomechanics and Motor Control.
These notes (notebooks) are written using Jupyter Notebook, part of the Python ecosystem for scientific computing.

Colab
Binder Classic Notebook
Binder JupyterLab
DOI

Introduction

Scientific programming

Numerical data analysis

Mechanics

Kinematics

Kinetics

Modeling and simulation of human movement

Biomechanical tasks Analysis

Electromyography

How to cite this work

Here is a suggestion to cite this GitHub repository:

Marcos Duarte and Renato Naville Watanabe. (2021). Notes on Scientific Computing for Biomechanics and Motor Control (Version v0.0.2). Zenodo. http://doi.org/10.5281/zenodo.4599319

And a BibTeX entry:

@misc{marcos_duarte_2021_4599319,
  author       = {Marcos Duarte and Renato Naville Watanabe},
  title        = {{Notes on Scientific Computing for Biomechanics and Motor Control}},
  month        = mar,
  year         = 2021,
  publisher    = {Zenodo},
  version      = {v0.0.2},
  doi          = {10.5281/zenodo.4599319},
  url          = {https://doi.org/10.5281/zenodo.4599319}
}

License

The non-software content of this project is licensed under a Creative Commons Attribution 4.0 International License, and the software code is licensed under the MIT license.

bmc's People

Contributors

alessandro-gentilini avatar demotu avatar giulia-novoa avatar gustavo-sorrentino avatar jaquelinevictal avatar lucassantanasilva avatar rnwatanabe avatar thiagoshida avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmc's Issues

Inverse Dynamics

I have looked through your notes and they are brilliant. I have skimmed through your notes and have a shallow grasp of some of the concepts. Lets say someone has smart shoes and other wearables that can record the ground contact time, strike angle, left/right foot balance, distance, heart rate, muscle impulses, flight time, stride length, pace, cadence and so on, but not the force applied to the ground nor the ground reaction forces. Can I use inverse dynamics to determine the forces given all the other parameters? If I apply body segmentation and calculate my centre of mass and centre of pressure, can that be converted into a time series ? Does the position of the centre of mass affect posture and form ? When accounting for drag, how big is the difference in the surfaces of a cyclist and a sprinter ? Another question I have would be, if say, someone was on a wind surfing board and could accurately locate their position on a body of water using gps and also using an accelerometer on the sail, how would one apply inverse dynamics to calculate bouyancy forces, forces on an individual, and the propulsion force ?

AMTIbsf.py TypeError

  File "\\#Measurements\\AMTINetForce\AMTIbsf.py", line 171, in loadbsf
    data = np.array(data).reshape((mh.numDatasets, mh.TNC))
TypeError: 'float' object cannot be interpreted as an integer
[Finished in 3.2s with exit code 1]

Example on how to write rich text in issues

Besides the format options in the toolbar when editing an issue,
Latex:

<img src="https://render.githubusercontent.com/render/math?math=\frac{\mathrm d }{\mathrm d t}\left({\frac{\partial\mathcal{L}}{\partial\dot{q}_i }}\right)-\frac{\partial \mathcal{L}}{\partial q_i }=Q_{NCi}\quad i=1,\dotsc,N">
...
Image (drag and drop image file here but use html code to set its size):

<img src="https://user-images.githubusercontent.com/3271581/76967836-b1af5700-6906-11ea-8a26-ef2c89ca1460.png" height="100" >
...

Threshold values for peaks and valleys.

I am trying to detect local maxima (* peaks12* used in the code below) and local minima (* peaks13*) from a vector called nrz. All peaks and valleys should be at above 0.25 and below -0.25 respectively. Since my data is per second, I am using mpd=1. I also want to have a new peak or valley only if the vector value has dropped below 0.1 or rised above -0.1. When I use the code below, it doesn’t seem to work for my case.

peak12 = detect_peaks(nrz, mph=0.25 , mpd=1, threshold=0.25, valley=False)
peak13 = detect_peaks(nrz,mph=-0.25, mpd=1, threshold=-0.25, valley=True)

Should I use another parameter when calling the function?
(I also attached a simple .xlsx file with the peaks and valleys I want to detect.
example.xlsx

Thx for the greate tutorials!

First of all, thank you for writing such a great tutorial. It's both informative and detailed.
I'm very interested in using python to do biomechanics simulation and control.

Is there any plan for adding more tutorials on motor control? I've found it scarce not only in python control but also in biomechanics. I'm mostly interested in using control theory for biomechanics control.

Thx for all you've done!

Issue when specifying ax object for plotting

Thanks for this code, it's been useful so far !

I discovered a small issue in the _plot() method. When specifying an ax object only the first reference would be plot.

The issue can be replicated as:
fig, ax = plt.subplots(ncols=3,nrows=3,figsize=(16,12))
ind1 = detectPeaks.detectPeaks(a1, show=True, ax=ax[2,0], threshold=0, kpsh=True, mpd=2, mph=5e-2)
ind2 = detectPeaks.detectPeaks(a2, show=True, ax=ax[2,1], threshold=0, kpsh=True, mpd=2, mph=5e-2)

The workaround is easy:
if ax is None:
_, ax = plt.subplots(1, 1, figsize=(8, 4))
noAx = True
else:
noAx = False
(...)

if noAx:
plt.show()

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.