Skip to content

Add conversion to EMG BIDS and notebooks to demo usage using mne and mne-bids#6

Open
agramfort wants to merge 2 commits into
facebookresearch:mainfrom
agramfort:bids_support
Open

Add conversion to EMG BIDS and notebooks to demo usage using mne and mne-bids#6
agramfort wants to merge 2 commits into
facebookresearch:mainfrom
agramfort:bids_support

Conversation

@agramfort

Copy link
Copy Markdown

Add conversion to EMG BIDS and notebooks to demo usage using mne and mne-bids

@meta-cla meta-cla Bot added the cla signed label Feb 3, 2026
@agramfort

Copy link
Copy Markdown
Author

@neuromechanist I took at stab at converting the emg2pose dataset to BIDS so it can be added to the NEMAR portal. Let me know what you think and how to move forward here.

cc @drmcloy @arnodelorme

@rick-warren the objective is to have all our EMG dataset easily accessible in a standard format so that the academic community can use it with standard open source tooling (eg mne and mne-bids as shown in the demo example).

@drammock drammock left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I didn't see this sooner @agramfort; I was tagged with the wrong username when the PR was opened.

Comment thread scripts/convert_emg2pose_to_bids.py Outdated
subject=f"{subject_idx + 1:02d}",
session=f"{session_idx + 1:02d}",
task="emg2pose",
acquisition=side, # left or right hand

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should use recording entity I think, not acquisition (early on we were considering to use acquisition for simultaneous devices going into different files, but BIDS maintainers suggested recording instead)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread scripts/convert_emg2pose_to_bids.py Outdated
raw=raw,
bids_path=bids_path,
overwrite=True,
format="EDF",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just checking that 16-bit is OK with you (I didn't check what the bit depth is for the orig data in the HDF5 files). If not, use BDF.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch !

Comment thread environment.yml
- joblib==1.4.2
- nbformat==5.10.4
- mne==1.11
- mne-bids==0.18

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need MNE-BIDS @ 47b49127e072802d2e689c815bce7567bb5121f0 (or an MNE-BIDS release and a bump to 0.19) to get the radians to be preserved?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed ... I cannot land this as is for now.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

belated note: MNE-BIDS 0.19 was released 2 weeks ago, so it should be possible to move this forward now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants