Skip to content

Commit 244123d

Browse files
authored
FIX: bad_by_manual failing in ransac ch pos (#173)
1 parent b203a14 commit 244123d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

pyprep/find_noisy_channels.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,9 @@ def find_bad_by_ransac(
661661
self.EEGFiltered,
662662
self.sample_rate,
663663
self.ch_names_new,
664-
self.raw_mne._get_channel_positions()[self.usable_idx, :],
664+
self.raw_mne._get_channel_positions(self.raw_mne.ch_names)[
665+
self.usable_idx, :
666+
],
665667
exclude_from_ransac,
666668
n_samples,
667669
sample_prop,

tests/test_find_noisy_channels.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def test_find_bad_by_ransac(raw_tmp):
237237
}
238238
bads = {}
239239
corr = {}
240+
raw_tmp.info["bads"] = ["Pz"]
240241
for name, args in test_matrix.items():
241242
nd = NoisyChannels(
242243
raw_tmp, do_detrend=False, random_state=ransac_rng, matlab_strict=args[0]

0 commit comments

Comments
 (0)