Skip to content

Commit

Permalink
MNT: use self.set_montage at the end of EpochsEEGLAB.__init__ (mne-to…
Browse files Browse the repository at this point in the history
  • Loading branch information
massich authored and larsoner committed Jun 26, 2019
1 parent 3b1704f commit 4939f51
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mne/io/eeglab/eeglab.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..meas_info import create_info
from ..base import BaseRaw
from ...utils import logger, verbose, warn, fill_doc, Bunch
from ...channels.montage import Montage, _set_montage
from ...channels.montage import Montage
from ...epochs import BaseEpochs
from ...event import read_events
from ...annotations import Annotations, read_annotations
Expand Down Expand Up @@ -507,11 +507,9 @@ def __init__(self, input_fname, events=None, event_id=None, tmin=0,

logger.info('Extracting parameters from %s...' % input_fname)
input_fname = op.abspath(input_fname)
info, eeg_montage, update_ch_names = _get_info(eeg, eog=eog)
info, eeg_montage, _ = _get_info(eeg, eog=eog)
montage = eeg_montage if montage is None else montage
del eeg_montage
_set_montage(info, montage=montage, update_ch_names=update_ch_names,
set_dig=True)
for key, val in event_id.items():
if val not in events[:, 2]:
raise ValueError('No matching events found for %s '
Expand Down Expand Up @@ -542,6 +540,7 @@ def __init__(self, input_fname, events=None, event_id=None, tmin=0,

# data are preloaded but _bad_dropped is not set so we do it here:
self._bad_dropped = True
self.set_montage(montage)
logger.info('Ready.')


Expand Down

0 comments on commit 4939f51

Please sign in to comment.