Skip to content

ENH: Add support for plotting ICA source timecourses in Report.add_ica#13697

Open
Aniketsy wants to merge 4 commits intomne-tools:mainfrom
Aniketsy:fix-13265
Open

ENH: Add support for plotting ICA source timecourses in Report.add_ica#13697
Aniketsy wants to merge 4 commits intomne-tools:mainfrom
Aniketsy:fix-13265

Conversation

@Aniketsy
Copy link
Contributor

fixes #13265

image

This is the result after local testing. I followed the documentation referenced in the issue to implement the feature. Please let me know if any improvements are needed. Thanks!

@Aniketsy
Copy link
Contributor Author

Aniketsy commented Mar 9, 2026

@larsoner gentle ping, please review these changes when you have a chance. Thanks!

if plot_sources:
if inst is None:
warn(
"Cannot plot ICA sources because inst=None. "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be an error rather than a warning. Easy enough for a user to pass False if inst is None

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that make sense, I'll update

:meth:`mne.preprocessing.ICA.plot_sources`. Requires ``inst``
to be provided. Defaults to ``False``.
.. versionadded:: 1.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.9?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I missed this, it should be 1.12

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.

Improve mne.Report.add_ica with ica.plot_sources

2 participants