Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion doc/changes/latest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ Changelog

- Add ``'auto'`` option to :meth:`mne.preprocessing.ICA.find_bads_ecg` to automatically determine the threshold for CTPS method by `Yu-Han Luo`_

- Add a ``notebook`` 3d backend for visualization in jupyter notebook with :func:`mne.viz.set_3d_backend` by`Guillaume Favelier`_
- Add a ``notebook`` 3d backend for visualization in jupyter notebook with :func:`mne.viz.set_3d_backend` by `Guillaume Favelier`_

- Add support for reading and writing surfaces in Wavefront .obj format to the :func:`mne.read_surface` and :func:`mne.write_surface` by `Marijn van Vliet`_

- Add tutorial on how to manually fix BEM meshes in Blender by `Marijn van Vliet`_ and `Ezequiel Mikulan`_

- :func:`mne.write_evokeds` will now accept :class:`mne.Evoked` objects with differing channel orders in ``info['bads']``, which would previously raise an exception by `Richard Höchenberger`_

Bug
~~~

Expand Down
2 changes: 1 addition & 1 deletion mne/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,7 @@ def _compare_epochs_infos(info1, info2, name):
info2._check_consistency()
if info1['nchan'] != info2['nchan']:
raise ValueError(f'{name}.info[\'nchan\'] must match')
if info1['bads'] != info2['bads']:
if set(info1['bads']) != set(info2['bads']):
raise ValueError(f'{name}.info[\'bads\'] must match')
if info1['sfreq'] != info2['sfreq']:
raise ValueError(f'{name}.info[\'sfreq\'] must match')
Expand Down
9 changes: 9 additions & 0 deletions mne/tests/test_evoked.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,15 @@ def test_io_evoked(tmpdir):
with pytest.warns(RuntimeWarning, match='-ave.fif'):
read_evokeds(fname2)

# test writing when order of bads doesn't match
fname3 = tmpdir.join('test-bad-order-ave.fif')
condition = 'Left Auditory'
ave4 = read_evokeds(fname, condition)
ave4.info['bads'] = ave4.ch_names[:3]
ave5 = ave4.copy()
ave5.info['bads'] = ave4.info['bads'][::-1]
write_evokeds(fname3, [ave4, ave5])

# constructor
pytest.raises(TypeError, Evoked, fname)

Expand Down