-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Compute and plot PSD for all channels #11722
Comments
From what I recall in several places we have |
If that's how it's already done in some functions I'm OK with having a combination of |
But then how do we handle things like |
I think @drammock was actually trying to move this direction recently with some
No idea how this is currently handled, |
I would copy how evoked.plot behaves
https://mne.tools/stable/generated/mne.Evoked.html#mne.Evoked.plot
… Message ID: ***@***.***>
|
Coming back to this one:
I'm pretty sure that |
Sounds good to me |
Will be having a go at it! |
Our definition of
picks
is inconsistent across various functions (see e.g. #11382). Here's another example where we could make the behavior more consistent: Plotting the PSD of all channels (good and bad).Currently, this is not possible, or at least it is not immediately obvious how to do it. I've described this in our forum: https://mne.discourse.group/t/computing-and-plotting-psd-with-all-channels/7025/1
In a nutshell:
psd = raw.compute_psd()
is to explicitly list them inpicks
. Rather unintuitively,picks="all"
,picks="data"
, andpicks="eeg"
all include only good channels.Spectrum
object withpsd.plot()
has its ownpicks
parameter. But if bad channels are not present in the first place, the recent change in v1.5 of showing all channels by default has no impact.Here's a possible solution to improve consistency:
picks="all"
to use all channels (good and bad)picks="good"
to use only good channelspicks="bad"
to use only bad channelspicks="data"
to use data channels (good and bad)picks="eeg"
(and other types) to use all channels of that type (good and bad)However, this gets a bit complicated, especially when considering that at least
Spectrum.plot()
has anexclude
parameter (which is basically the opposite ofpicks
). I assume that only one of the two arguments can be passed, but we'd also need to translate any changes to the behavior ofpicks
toexclude
. BTW,raw.compute_psd()
has noexclude
parameter, which is also inconsistent.Another option could be to add a new parameter to deal with bad channels (e.g.
include_bads=True
). This would make the two selections independent of each other (and probably simpler, IDK).The text was updated successfully, but these errors were encountered: