There was an error while loading. Please reload this page.
1 parent 8fccf71 commit 6e6c4a4Copy full SHA for 6e6c4a4
1 file changed
mne/epochs.py
@@ -4676,4 +4676,6 @@ def channel_specific_epoch_rejection(
4676
mean = np.mean(abs_data, axis=(-1, 0)) # (channels X (frequency))
4677
# keep epochs where the maximum voltage is smaller than the mean + (outliers * std)
4678
keep = max < ((outliers * std) + mean) # (epochs X channels X (frequency))
4679
+ # set values to NaN where 2D mask is False in the 3D data array
4680
+ data[keep is False] = np.nan
4681
return keep
0 commit comments