Skip to content

Commit

Permalink
Backport #10041, #10065 (#10068)
Browse files Browse the repository at this point in the history
* decim is actually used for epochs (#10041)

* Don't warn when using decim with ICA.fit() on epochs (#10065)

* Don't warn when using decim with ICA.fit() on epochs

Follow-up to #10041

* Fix tests

Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
  • Loading branch information
hoechenberger and agramfort committed Dec 1, 2021
1 parent 7b5c61c commit 00f2791
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions mne/preprocessing/ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,6 @@ def fit(self, inst, picks=None, start=None, stop=None, decim=None,
decim : int | None
Increment for selecting only each n-th sampling point. If ``None``,
all samples between ``start`` and ``stop`` (inclusive) are used.
.. note:: This parameter only has an effect if ``inst`` is
`~mne.io.Raw` data.
reject, flat : dict | None
Rejection parameters based on peak-to-peak amplitude (PTP)
in the continuous data. Signal periods exceeding the thresholds
Expand Down Expand Up @@ -620,8 +617,8 @@ def fit(self, inst, picks=None, start=None, stop=None, decim=None,
if not isinstance(inst, BaseRaw):
ignored_params = [
param_name for param_name, param_val in zip(
('start', 'stop', 'decim', 'reject', 'flat'),
(start, stop, decim, reject, flat)
('start', 'stop', 'reject', 'flat'),
(start, stop, reject, flat)
)
if param_val is not None
]
Expand Down
1 change: 0 additions & 1 deletion mne/preprocessing/tests/test_ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,6 @@ def test_fit_methods(method, tmp_path):
(
('start', 0),
('stop', 500),
('decim', 2),
('reject', dict(eeg=500e-6)),
('flat', dict(eeg=1e-6))
)
Expand Down

0 comments on commit 00f2791

Please sign in to comment.