About exporting .EDF files

  • MNE version 1.7
  • operating system: Windows 11

Code directory:

  • mne-python/mne/export/_edf.py
  • line 68

Observation:
In line 68 of _edf.py, the data is padded with zeros using the following line of code: data = np.pad(data, (0, int(pad_width)))

I had a situation where the range of my raw EEG data was way far from zero which caused some problems. I was wondering if instead of padding with zeros, it would be better to pad with the last data point value.

Thanks!

1 Like

@QianChu appears to have updated that module to use edge padding instead of zero padding (as you suggested) in Change EDF zero-padding to edge-padding with annotation and test by qian-chu · Pull Request #12676 · mne-tools/mne-python · GitHub.

This update hasn’t yet been incorporated into the stable MNE release. Could you try using the development version of MNE to see if it resolves the issue? Alternatively, you could wait for the upcoming MNE 1.8 release, which is expected within the next few weeks.

2 Likes

Thank you for the reply. This is very helpful!
I will wait for the MNE 1.8 release.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.