ENH: Allow dict for times in plot_evoked_joint(#13289)#13573
Open
shruti423 wants to merge 5 commits intomne-tools:mainfrom
Open
ENH: Allow dict for times in plot_evoked_joint(#13289)#13573shruti423 wants to merge 5 commits intomne-tools:mainfrom
shruti423 wants to merge 5 commits intomne-tools:mainfrom
Conversation
37d61be to
38da269
Compare
38da269 to
2c0734b
Compare
Contributor
|
@shruti423 Do you think this is ready for a review, or did you intend to push more? |
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.
This PR enhances the
timesparameter inplot_evoked_joint(and effectivelyplot_topomap) to accept a dictionary, addressing issue #13289.Previously,
times="peaks"hardcoded the search to 3 peaks over the full epoch. This update allows users to specify:times={"peaks": 5}(finds 5 peaks over the whole epoch).times={"peaks": [(0.0, 0.1), (0.3, 0.5)]}(finds one peak per window).I modified
mne/viz/utils.pyto handle the dictionary logic inside_process_times, ensuring internal consistency across both plotting functions as suggested by @drammock.Checklist
evoked.pywith new usage andnp.linspacehint).test_plot_joint_times_dictintest_evoked.py).test_evoked.py, andutils.pylocally).Related Issue
Fixes #13289