Skip to content

Commit 32a87f8

Browse files
committed
added masked data to channel specific rejection
1 parent d7ccfd4 commit 32a87f8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

mne/epochs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4675,4 +4675,6 @@ def channel_specific_epoch_rejection(data: np.ndarray,
46754675
mean = np.mean(abs_data, axis=(-1, 0)) # (channels X (frequency))
46764676
# keep epochs where the maximum voltage is smaller than the mean + (outliers * std)
46774677
keep = max < ((outliers * std) + mean) # (epochs X channels X (frequency))
4678-
return keep
4678+
# set values in 3D data arry to NaN where 2D mask is False
4679+
data[keep is False] = np.nan
4680+
return keep, data

0 commit comments

Comments
 (0)