EmbodiedCognition / py-c3d

Read & write C3D mocap files
http://c3d.rtfd.org
MIT License
104 stars 47 forks source link

force plate data not aligned #6

Closed dukeduck1984 closed 7 years ago

dukeduck1984 commented 7 years ago

Hi,

I tried to parse a c3d file from Kistler force plate and get the Fz1 data from it. In V3D, Fz1 is the 3rd channel (starting from 1) and has 5 sub channels. But when parsing with py-c3d, the 5 sub channels are analog[0, 2], [3, 0], [5, 3], [8, 1], [10, 4]. I had to reshape analog to (5, -1), so that I can get the 5 sub channels of Fz1 by analog[:, 2].

Is it a bug or did I do something wrong? The c3d file attached. The 13th channel is for the sync with EMG by the way.

Thanks. Kaiyuan FP_CMJ_6.zip

lmjohns3 commented 7 years ago

Looks like there's a potential solution for this issue in #7 -- please have a look, hopefully a PR is forthcoming.

AKuederle commented 7 years ago

@dukeduck1984 I created a pull request (#8) , that hopefully fixes your issue. I unfortunately can not test the change for a couple of days. It would be really great, if you can test if it fixes your issue :)