mnelab
mnelab copied to clipboard
read_raw cannot handle ambiguous file formats
The current implementation of read_raw
(soon to be part of MNE) cannot distinguish between file formats that can contain either raw (continuous) or epoched data. For example, .FIF files can store both data types, but currently MNELAB assumes that .FIF files always contain continuous raw data. This should be changed in order to support loading epoched data.
Is this an upstream issue with mne.io.read_raw? I can check.
This is not an upstream issue, and maybe the title of this issue is not accurate. It is OK that read_raw
reads only raw (= continuous) files. Epochs are imported with read_epochs
(only for FIFF files) and read_epochs_*
for other file types (this is not consistent because read_epochs
should be named read_epochs_fif
maybe).
So it's really something that we need to check. If a user opens a FIFF file, we need to determine if it contains raw or epoched data and then call the appropriate function.