Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix eeglab export rawarray filenames #10927

Merged
merged 8 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/changes/latest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ Enhancements

Bugs
~~~~
- Fix bug in :func:`mne.export.export_raw` to ignore None value in filenames attribute of :class:`mne.io.RawArray` (:gh:`10927` by :newcontrib:`Reza Nasri`)

- Fix bug in :func:`mne.io.read_raw_edf` to allow reading in all Hypnodyne ZMax EDFs to be read in without issues (:gh:`10754` by :newcontrib:`Frederik Weber`)

- Fix bug in :func:`mne.Epochs.drop_bad` where data was loaded although no rejection had to be performed (:gh:`10718` by :newcontrib:`Lukas Gemein`)
Expand Down
2 changes: 2 additions & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,5 @@
.. _Frederik Weber: https://github.com/Frederik-D-Weber

.. _Mingjian He: https://github.com/mh105

.. _Reza Nasri: https://github.com/0reza
cbrnr marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion mne/export/_eeglab.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def _export_raw(fname, raw):

# remove extra epoc and STI channels
drop_chs = ['epoc']
if not (raw.filenames[0].endswith('.fif')):
# filenames attribute of RawArray is filled with None
if raw.filenames[0] and not (raw.filenames[0].endswith('.fif')):
drop_chs.append('STI 014')

ch_names = [ch for ch in raw.ch_names if ch not in drop_chs]
Expand Down