Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the EMG Elite (BTS) file format in BTK that needs to be fixed in OpenMA #47

Closed
Alzathar opened this issue Dec 19, 2016 · 9 comments
Assignees
Labels
Milestone

Comments

@Alzathar
Copy link
Member

This post on the OpenMA forum mentioned an issue with the loading of the EMG data with BTK. This needs to be fixed in OpenMA. Some data are requested to improve the parser.

@Alzathar Alzathar added the bug label Dec 19, 2016
@Alzathar Alzathar added this to the 1.0 milestone Dec 19, 2016
@Alzathar Alzathar self-assigned this Dec 19, 2016
@marnunez
Copy link
Contributor

Were should this be fixed? I found no IO code in OpenMA besides of c3d. Should I fork BTK? I can provide samples for any of the old BTS formats, including the .EMG files

@Alzathar
Copy link
Member Author

Currently, the parser for the BTS file formats is not yet available in OpenMA. I created a new issue about the implementation of the parsers for the BTS file formats (see issue #49) .

It is planned to progressively integrate the old BTK parsers in OpenMA. The major work is to adapt the code used to extract the data and load them in the new data structure.

@marnunez
Copy link
Contributor

marnunez commented Dec 20, 2016

Found the bug! For some bloody reason, all my EMG files have the channel descriptions with spaces afterwards (e.g: 'L_RF ') while the old ones you had have them stripped off ('L_RF'). Same goes for the units ('mV ' instead of 'mV'). Stripping the whitespaces with a hex editor allowed me to import the files with Mokka. Nevertheless, it should still be considered a bug. BTS EMG data structure has from byte 12 to 268 reserved for file descriptions (that's 8 chars for each one of the 32 channels available) and from 268 to 396 for units (4 chars for each channel)

@Alzathar
Copy link
Member Author

@marnunez Can you attach a file with the extra whitespaces? I would add a unit test with the fix. If you prefer, you can fork openma-data, and create a pull request with this file.

@marnunez
Copy link
Contributor

Sure! Here goes an entire acquisition sample.
22xxx.zip

Alzathar added a commit to OpenMA/openma-data that referenced this issue Jan 6, 2017
@Alzathar
Copy link
Member Author

Alzathar commented Jan 6, 2017

@marnunez The commit 93eb11f fixed this issue. However, I still need to verify with you the exact number of samples in your EMG file. Is it 4522 or 4523?

@Alzathar
Copy link
Member Author

@marnunez Any chance for you to check the number of samples in the file 22XXXC0B.EMG that returns the BTS software? We will be able to close this issue then.

@marnunez
Copy link
Contributor

@Alzathar Sorry for the delay. Acording to BTS's software, the LRF channel for example has 4522 frames at 500 Hz. This is a text output:
LRF.txt

@Alzathar
Copy link
Member Author

@marnunez Thanks for your data. The commit e437d2f integrated them to verify the implementation of the BTS EMG parser.

@Alzathar Alzathar modified the milestones: 0.5, 1.0 Feb 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants