pelednoam
(Noam Peled)
June 8, 2022, 8:49pm
1
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.
richard
(Richard Hƶchenberger)
June 9, 2022, 8:28am
3
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:
A free and open platform for sharing MRI, MEG, EEG, iEEG, ECoG, ASL, and PET data
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.
richard
(Richard Hƶchenberger)
June 9, 2022, 10:51pm
6
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
richard
(Richard Hƶchenberger)
June 12, 2022, 11:08am
7
@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