reading pre saved .fif is slower than parse raw .edf

  • MNE version: e.g. 0.24.1
  • operating system: Windows 10

Dear mne community! My goal is to avoid repetative parsing, since I’m working with large EDF files. My idea was to save raw object to file, so if I modify my script and want to apply it to the same data many times, I don’t have to parse the EDF each time, but load pre-saved raw object. I assumed that there are some tools, that allow to achieve this.

I tried to pre-save the data in .fif format and then load it with read_raw_fif() but it turns out to be slower than read_raw_edf() what is actually parsing I won’t to avoid.
I’m not familiar with .fif formal so it probably EDF style format but maybe even heavier.

Additional thought was to save the data array which is np.ndarray but then how do I construct raw object with this pre-saved matrix? I have to have all metadata(headers, sampling frequency, ect) to build proper raw object…

Thanks in advance!

did you try using read_raw_fif(..., preload=False)? That keeps the data on disk and only loads it into RAM when needed (for filtering, plotting, etc)

Thank you! Did the job :grin: