Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/changes/devel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Bugs
- Fix bug with :meth:`mne.viz.Brain.get_view` where calling :meth:`~mne.viz.Brain.show_view` with returned parameters would change the view (:gh:`12000` by `Eric Larson`_)
- Fix bug with :meth:`mne.viz.Brain.show_view` where ``distance=None`` would change the view distance (:gh:`12000` by `Eric Larson`_)
- Fix bug with :meth:`~mne.viz.Brain.add_annotation` when reading an annotation from a file with both hemispheres shown (:gh:`11946` by `Marijn van Vliet`_)
- Fix bug with reported component number and errant reporting of PCA explained variance as ICA explained variance in :meth:`mne.Report.add_ica` (:gh:`12155` by `Eric Larson`_)
- Fix bug with reported component number and errant reporting of PCA explained variance as ICA explained variance in :meth:`mne.Report.add_ica` (:gh:`12155`, :gh:`12167` by `Eric Larson`_ and `Richard Höchenberger`_)
- Fix bug with axis clip box boundaries in :func:`mne.viz.plot_evoked_topo` and related functions (:gh:`11999` by `Eric Larson`_)
- Fix bug with ``subject_info`` when loading data from and exporting to EDF file (:gh:`11952` by `Paul Roujansky`_)
- Fix bug where :class:`mne.Info` HTML representations listed all channel counts instead of good channel counts under the heading "Good channels" (:gh:`12145` by `Eric Larson`_)
Expand Down
8 changes: 5 additions & 3 deletions mne/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,6 @@ def _plot_ica_properties_as_arrays(*, ica, inst, picks, n_jobs):
"""
import matplotlib.pyplot as plt

if picks is None:
picks = list(range(ica.n_components_))

def _plot_one_ica_property(*, ica, inst, pick):
figs = ica.plot_properties(inst=inst, picks=pick, show=False)
assert len(figs) == 1
Expand Down Expand Up @@ -1666,9 +1663,14 @@ def _add_ica_properties(
)
return

if picks is None:
picks = list(range(ica.n_components_))

figs = _plot_ica_properties_as_arrays(
ica=ica, inst=inst, picks=picks, n_jobs=n_jobs
)
assert len(figs) == len(picks)

captions = []
for idx in range(len(figs)):
caption = f"ICA component {picks[idx]}."
Expand Down
1 change: 1 addition & 0 deletions mne/report/tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ def test_manual_report_2d(tmp_path, invisible_fig):
inst=epochs_baseline,
picks=[0],
)
r.add_ica(ica=ica, title="my ica with picks=None", inst=epochs_baseline, picks=None)
r.add_covariance(cov=cov, info=raw_fname, title="my cov")
r.add_forward(
forward=fwd_fname,
Expand Down