Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Avoid warning in report.add_ica #11232

Merged
merged 2 commits into from
Oct 9, 2022
Merged

BUG: Avoid warning in report.add_ica #11232

merged 2 commits into from
Oct 9, 2022

Conversation

larsoner
Copy link
Member

@larsoner larsoner commented Oct 7, 2022

Over in mne-bids-pipeline I'm trying to squash all warnings, but I get:

mne_bids_pipeline/scripts/preprocessing/_05a_apply_ica.py:122: RuntimeWarning:
The data you passed to ICA.apply() was baseline-corrected. Please note that ICA can introduce
DC shifts, therefore you may wish to consider baseline-correcting the cleaned data again.

This adds a on_baseline='warn' that we can set to on_baseline='reapply' to avoid this and reapply the baseline after ica.apply. Internally report.add_ica will always use on_baseline='reapply' for ica.plot_overlay, but in principle we could expose this as a parameter.

Okay for you @agramfort ?

@larsoner larsoner added this to the 1.2 milestone Oct 7, 2022
@agramfort
Copy link
Member

@larsoner I let you merge if the CI failures are expected. 🙏

@larsoner larsoner enabled auto-merge (squash) October 9, 2022 18:09
@larsoner larsoner merged commit 0a0e00f into mne-tools:main Oct 9, 2022
@larsoner larsoner deleted the ica branch October 9, 2022 18:59
larsoner added a commit to larsoner/mne-python that referenced this pull request Oct 11, 2022
* upstream/main:
  BUG: Avoid warning in report.add_ica (mne-tools#11232)
  testing new features of website theme [circle deploy] (mne-tools#11033)
  BUG: Fix regression with run_subprocess (mne-tools#11230)
  DOC:  fix mne-kit-gui package name (mne-tools#11231)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants