bmclab / bmc Goto Github PK
View Code? Open in Web Editor NEWNotes on Scientific Computing for Biomechanics and Motor Control
Home Page: https://bmclab.github.io/BMC/
License: Creative Commons Attribution 4.0 International
Notes on Scientific Computing for Biomechanics and Motor Control
Home Page: https://bmclab.github.io/BMC/
License: Creative Commons Attribution 4.0 International
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 ?
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()
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!
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" >
...
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]
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.