@@ -57,14 +57,14 @@ class NoisyChannels:
5757 List of channels that are bad. These channels will be excluded when
5858 trying to find additional bad channels. Note that the union of these channels
5959 and those declared in ``raw.info["bads"]`` will be used. Defaults to ``None``.
60- reject_by_annotation : {None, 'omit', 'NaN' } | None
60+ reject_by_annotation : {None, 'omit'} | None
6161 How to handle BAD-annotated time segments (annotations starting with
6262 "BAD" or "bad") during channel quality assessment. If ``'omit'``,
6363 annotated segments are excluded from analysis (clean segments are
64- concatenated). If ``'NaN'``, annotated samples are replaced with NaN
65- values. If ``None`` (default), annotations are ignored and the full
66- recording is used. This is useful when recordings contain breaks or
67- movement artifacts that shouldn't influence channel rejection decisions.
64+ concatenated). If ``None`` (default), annotations are ignored and the
65+ full recording is used. This is useful when recordings contain breaks
66+ or movement artifacts that shouldn't influence channel rejection
67+ decisions.
6868
6969 References
7070 ----------
@@ -110,12 +110,9 @@ def __init__(
110110 self .correlation = correlation
111111
112112 # Validate reject_by_annotation parameter
113- if reject_by_annotation is not None and reject_by_annotation not in (
114- "omit" ,
115- "NaN" ,
116- ):
113+ if reject_by_annotation is not None and reject_by_annotation != "omit" :
117114 raise ValueError (
118- f"reject_by_annotation must be None, 'omit', or 'NaN ', "
115+ f"reject_by_annotation must be None or 'omit ', "
119116 f"got: { reject_by_annotation } "
120117 )
121118 # reject_by_annotation is not available in MATLAB PREP
@@ -320,7 +317,7 @@ def find_all_bads(
320317 to the other methods. If ``None`` (default), then the value at
321318 instantiation of the ``NoisyChannels`` class is taken (defaults
322319 to ``True``), else the instantiation value is overwritten.
323- reject_by_annotation : {None, 'omit', 'NaN' } | None
320+ reject_by_annotation : {None, 'omit'} | None
324321 This parameter is accepted for compatibility but is ignored here.
325322 Annotation rejection is applied during ``NoisyChannels`` initialization,
326323 not during ``find_all_bads``. To use annotation rejection, pass
0 commit comments