Write BIDS based on Epochs.


I do not know if that is even possible, I am pretty new to this lib and EEG world in general, so here is a naive question: in mne-python, is there any way to run write_raw_bids or an equivalent function on a BaseEpochs (EpochsEEGLAB) instance?

This function only accepts BaseRaw instances, and raises:

Exception ex:
[1] raw_file must be an instance of BaseRaw, got <class '[mne.io](http://mne.io).eeglab.eeglab.EpochsEEGLAB'>

Thanks :slight_smile:

Hi @roc,

You are correct that write_raw_bids expects a BaseRaw instance. This is because (as far as I know), to be BIDS compliant the data need to be in its continuous form. Saving an Epochs object would fall under writing a BIDS derivative. MNE-BIDS doesn’t support this yet but there is interest in extending support for writing derivatives.