Skip to content
8 changes: 4 additions & 4 deletions mne/preprocessing/ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def _find_bads_ch(self, inst, chs, threshold=3.0, start=None,
idx_unique.remove(i)
if len(scores) == 1:
scores = scores[0]
labels[prefix] = list(idx)
labels = list(idx)

return labels, scores

Expand Down Expand Up @@ -1174,7 +1174,7 @@ def find_bads_ecg(self, inst, ch_name=None, threshold=None, start=None,
elif method == 'correlation':
if threshold is None:
threshold = 3.0
self.labels_, scores = self._find_bads_ch(
self.labels_['ecg'], scores = self._find_bads_ch(
inst, [ecg], threshold=threshold, start=start, stop=stop,
l_freq=l_freq, h_freq=h_freq, prefix="ecg",
reject_by_annotation=reject_by_annotation)
Expand Down Expand Up @@ -1244,7 +1244,7 @@ def find_bads_ref(self, inst, ch_name=None, threshold=3.0, start=None,
inds = pick_channels(inst.ch_names, ch_name)
ref_chs = [inst.ch_names[k] for k in inds]

self.labels_, scores = self._find_bads_ch(
self.labels_['ref_meg'], scores = self._find_bads_ch(
inst, ref_chs, threshold=threshold, start=start, stop=stop,
l_freq=l_freq, h_freq=h_freq, prefix="ref_meg",
reject_by_annotation=reject_by_annotation)
Expand Down Expand Up @@ -1306,7 +1306,7 @@ def find_bads_eog(self, inst, ch_name=None, threshold=3.0, start=None,
logger.info('Using EOG channel %s' % inst.ch_names[eog_inds[0]])
eog_chs = [inst.ch_names[k] for k in eog_inds]

self.labels_, scores = self._find_bads_ch(
self.labels_['eog'], scores = self._find_bads_ch(
inst, eog_chs, threshold=threshold, start=start, stop=stop,
l_freq=l_freq, h_freq=h_freq, prefix="eog",
reject_by_annotation=reject_by_annotation)
Expand Down