Error message when importing an epoched fif file that was preprocessed with MNE python into brainstorm

Hi all,

I'm trying to import an epoched Elekta Neuromag fif file that I have preprocessed and saved with MNE python (epochs = mne.Epochs(raw), if you need more details, let me know).
I get the following error message (screenshot attached). I'm not sure whether the "fif" file format is actually of the type that Brainstorm expects. Does anyone have experience with that?
Any help is greatly appreciated.

Thanks a lot,


Brainstorm should be able to read the epoched files created with MNE-python.
If it does not, we should fix it.

Can you please share an example file with us?
(upload it somewhere and post the download link here)


Thanks for the quick reply, Francois!

Here is a smalle example dataset:

I also updated brainstorm to the latest version today. I get the same error (now in the call stack, tree_callbacks.m returns from line 622 instead from 615, otherwise the error message is identical)


The epoched files created by MNE were not supported at all by Brainstorm.
I added some basic support for these files:

However, I'm not sure what I'm supposed to do with the events read from this file by fiff_read_events.m. We get one matrix events with 3 columns: [sample, ?, event_id], but how do we relate the samples in this matrix with the samples in this example file.
@Alexandre ?

Thanks a lot Francois!

re events: I think you can disregard them for the time being. In most cases, after epoching, the event information is not needed anymore. The 3-by-n matrix you get [sample, ?, event_id] contains the sample number at which the event occurs with respect to the continuous data considering also the "first_samp" attribute of a raw fif dataset, i.e. the number of the first sample that contains some data. Reconstructing the event information for the epoched data, without further information of how the epoching was done, is, I think, anyway impossible.