Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exclude parameter to raw.plot_psd() #9519

Merged
merged 4 commits into from Jul 7, 2021

Conversation

cbrnr
Copy link
Contributor

@cbrnr cbrnr commented Jul 1, 2021

Fixes #9441.

This adds an exclude parameter to raw.plot_psd(), which makes it possible to plot the PSD of all channels (including bads) using raw.plot_psd(exclude=[]).

Questions/To Do:

  • Add changelog in API or new section?
  • Add .. versionadded :: 0.24.0 tag?
  • Add note somewhere (docstring?) to show how to plot the PSD for all channels (including bads)?

Copy link
Member

@drammock drammock left a comment

Choose a reason for hiding this comment

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

Add changelog in API or new section?

I doubt this will break old code, so I'd put it as a new feature.

Add .. versionadded :: 0.24.0 tag?

sure, why not?

Add note somewhere (docstring?) to show how to plot the PSD for all channels (including bads)?

See my suggestion

mne/viz/raw.py Outdated Show resolved Hide resolved
Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

diff LGTM !

no objection to merge once CIs are green.

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 1, 2021

@drammock any idea what is wrong with the docstring? It ends with a ".", so I don't understand the error message.

@drammock
Copy link
Member

drammock commented Jul 1, 2021

@drammock any idea what is wrong with the docstring? It ends with a ".", so I don't understand the error message.

missing space between .. and versionadded

@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 2, 2021

Ultraslow is timing out, otherwise looking good.

@agramfort
Copy link
Member

thx @cbrnr !

@cbrnr cbrnr force-pushed the add-exclude-raw-plot-psd branch from a1938c5 to f1ccc1c Compare July 7, 2021 13:00
@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 7, 2021

@larsoner there are two unused imports in mne/preprocessing/nirs/_scalp_coupling_index.py introduced in #9522 - do you want me to fix it as part of this PR or do you want a separate one?

@larsoner
Copy link
Member

larsoner commented Jul 7, 2021

Just pushed a hotfix

@cbrnr cbrnr force-pushed the add-exclude-raw-plot-psd branch from f1ccc1c to e371fe5 Compare July 7, 2021 13:15
@cbrnr
Copy link
Contributor Author

cbrnr commented Jul 7, 2021

All green, @drammock or @larsoner feel free to merge.

@drammock drammock merged commit 4656e13 into mne-tools:main Jul 7, 2021
@cbrnr cbrnr deleted the add-exclude-raw-plot-psd branch July 7, 2021 15:14
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.

Plot all channels with raw.plot_psd
4 participants