How to convert a .set file to a .fif file?

How to convert a .set file to a .fif file?

  • Read the .set file using mne.io.read_raw_eeglab.
  • Save it via Raw.save.

Hi, does mne plan to add the function that we can save data as .set or .edf, both raw data, and epoch?
@richard

Hello, no, not that I know of. The difficulty is ensuring that everything you do in MNE can actually be correctly stored in (and read back from) the file. I suppose for EEG, the BrainVision format might work quite well thanks to pybv, but this only applies to raw data, not epochs. For EEGLAB, I don’t think there’s a reliable writer available.

@sappelhoff might know more

1 Like

indeed, github.com/bids-standard/pybv should be the most robust writer for BrainVision format currently.

However, not all metadata that is saved in a FIF raw will be carried over to the BrainVision format. It’s just a question of what information the respective data format allows to be specified and what it does not.

Epochs are theoretically possible, but not yet implemented. There is a PR open to mne-python for implementing a reader for BrainVision epochs: WIP, ENH: BrainVision segmentation parsing by honzaseda · Pull Request #7792 · mne-tools/mne-python · GitHub

1 Like

If you want to export to something other than .fif, you can try MNELAB. It supports loading and exporting various file formats, so it can be used to convert to different formats.

Interesting! Have you considered adding this functionality to MNE?

yes but someone objected :slight_smile:

Alex

Whoops, that’s unfortunate :sweat_smile::see_no_evil:

:slightly_smiling_face: I can’t even remember if someone objected or if we just didn’t come to a conclusion.