Loading files from the multi-modal-human-neuroimaging-dataset

Hello!
Iā€™m trying to analyze this MEG public dataset:
https://legacy.openfmri.org/dataset/ds000117/

When Iā€™m trying to create epochs, all of them are dropped, and Iā€™m not sure why.
I tried to debug it, and it fails in the epochs._get_data function.
The _get_epoch_from_raw function returns None.
This code reproduces this problem:

raw_fname = ā€˜ā€¦/sub001/MEG/run_01_raw.fifā€™
raw = mne.io.read_raw_fif(raw_fname, preload=True)
picks = mne.pick_types(raw.info, meg=True, eeg=True, eog=False, exclude=ā€˜badsā€™)
events_fname = ā€˜ā€¦/sub001/model/model001/onsets/task001_run001/cond001.txtā€™
events = mne.read_events(events_fname)
events_conditions = {ā€˜scrambledā€™: 1}
epochs = mne.Epochs(raw, events, events_conditions, picks=picks, preload=True)

Thanks!!!

Hey Noam, could it be that your events are outside the data range, perhaps by not accounting for raw.first_samp properly? You might be able to solve by just adding raw.first_samp to the first column of your events.

Hello @pelednoam, and welcome to the forum!

first off, you shouldnā€™t be using openfmri.org anymore; the project now lives at https://openneuro.org.

You can find that specific dataset here:

You can download the data via openneuro-py.

Secondly, you must use MNE-BIDS to load the data, as itā€™s BIDS-formatted. Otherwise you will run into issues.

If youā€™re still having problems, please let us know.

Best wishes,
Richard

3 Likes

@richard, it doesnā€™t look like the fif files are in the openneuro linkā€¦ not sure if they didnā€™t port them over or what.

I am sorry, @alexrockhill and @pelednoam, I shared the wrong link.

The correct download location for ds000117 from OpenNeuro.org is:
https://openneuro.org/datasets/ds000117

I have edited my above response accordingly.

FYI we actually use this dataset as an example to showcase some of the features of the MNE-BIDS-Pipeline, see:

Faces dataset - MNE-BIDS-Pipeline

1 Like

@pelednoam Did you have any luck with this?

Nice, that looks like it should be compatible with MNE BIDS for sure. @pelednoam, this tutorial code will almost surely work and will fill extra fields in the raw object that will probably be useful 01. Read BIDS datasets ā€” MNE-BIDS 0.10 documentation.

1 Like