Add psd_args to plot_ica_sources and ICA.plot_sources#12912
Merged
larsoner merged 10 commits intomne-tools:mainfrom Oct 23, 2024
Merged
Add psd_args to plot_ica_sources and ICA.plot_sources#12912larsoner merged 10 commits intomne-tools:mainfrom
psd_args to plot_ica_sources and ICA.plot_sources#12912larsoner merged 10 commits intomne-tools:mainfrom
Conversation
for more information, see https://pre-commit.ci
larsoner
reviewed
Oct 22, 2024
Member
larsoner
left a comment
There was a problem hiding this comment.
Can you modify some test that calls ica.plot_sources? Probably a bit annoying to test that it actually has an effect, but you can at least have a smoke test like ica.plot_sources(..., psd_args=dict(...))
mne/preprocessing/ica.py
Outdated
| title=None, | ||
| show=True, | ||
| block=False, | ||
| psd_args=None, |
Member
There was a problem hiding this comment.
This should be placed after the * otherwise it's technically a backward compat break
mne/viz/ica.py
Outdated
| title=None, | ||
| show=True, | ||
| block=False, | ||
| psd_args=None, |
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
for more information, see https://pre-commit.ci
Contributor
Author
|
I dont get it. It fails with but didnt I revert this accidental change here: dd5091a |
larsoner
reviewed
Oct 23, 2024
mne/preprocessing/ica.py
Outdated
| reject="auto", | ||
| reject_by_annotation=True, | ||
| *, | ||
| psd_args=None, |
Member
There was a problem hiding this comment.
This one should move back up because it was already there.
Incidentally the error is about this order changing without the docstring also changing to reflect that
Member
Contributor
Author
|
Thank you! @larsoner |
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
Oct 28, 2024
* upstream/main: (824 commits) Add `psd_args` to `plot_ica_sources` and `ICA.plot_sources` (mne-tools#12912) Fix GDF NumPy >= 2 (mne-tools#12909) [pre-commit.ci] pre-commit autoupdate (mne-tools#12908) ENH: Improve report usability (mne-tools#12901) MAINT: Avoid problematic PySide6 (mne-tools#12902) Sync README dependencies with pyproject.toml (mne-tools#12890) remove trailing slash from pybv base URL [ci skip] (mne-tools#12892) Cast tuple of filenames to list to improve error handling (mne-tools#12891) Website (mne-tools#12885) [pre-commit.ci] pre-commit autoupdate (mne-tools#12888) BUG: Fix bugs with coreg (mne-tools#12884) Bump mamba-org/setup-micromamba from 1 to 2 in the actions group (mne-tools#12887) Update spacing for comments in pyproject.toml (mne-tools#12886) make HTML repr for Forward match others (mne-tools#12883) MAINT: Linkchecks [circle deploy] (mne-tools#12882) Update roadmap (mne-tools#12872) [MRG] Require good and bad channels when creating a SpectrumArray object (mne-tools#12877) [pre-commit.ci] pre-commit autoupdate (mne-tools#12879) MAINT: Update code credit (mne-tools#12880) BUG: Fix bug with Path casting (mne-tools#12878) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12905
This PR enhances the functionality of
mne.viz.plot_ica_sourcesandmne.preprocessing.ICA.plot_sourcesby introducing a newpsd_argsargument. This addition allows users to customize the power spectral density (PSD) plot that appears when right-clicking on an ICA label. This change makes these functions consistent withmne.viz.plot_ica_componentsandmne.preprocessing.ICA.plot_components, which already supportspsd_args.