Skip to content

ENH: Make number of ICA components plotted in reports dynamic#13958

Open
athishdresu wants to merge 4 commits into
mne-tools:mainfrom
athishdresu:ica-report-fix
Open

ENH: Make number of ICA components plotted in reports dynamic#13958
athishdresu wants to merge 4 commits into
mne-tools:mainfrom
athishdresu:ica-report-fix

Conversation

@athishdresu

Copy link
Copy Markdown

This PR addresses issue #13889 by removing the hard-coded limit of 20 components in _plot_sources and allowing the user to dynamically specify the number of ICA components to plot via a new n_channels parameter.

Changes made:

  • Added n_channels parameter to plot_ica_sources, _plot_sources, and the add_ica report generation methods.
  • Updated report.py to propagate this parameter through the report generation pipeline.
  • Added a safety fallback in _plot_sources to default to 20 if n_channels is not specified, ensuring backward compatibility.

Fixes #13889

@athishdresu

Copy link
Copy Markdown
Author

I have updated the docstrings in mne/viz/ica.py, mne/preprocessing/ica.py, and mne/report/report.py to include the new n_channels parameter and resolve the Sphinx build warnings. Let me know if anything else is needed

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 ICA latent source viz in Reports

1 participant