question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

plot_compare_evokeds should have the same defaults for `combine`

See original GitHub issue

Currently the function mne.viz.plot_compare_evokeds creates two different plots depending on the number of selected channels:

  • If one channel is selected (or present in the evoked), it will plot the ERP.
  • If two or more channels are selected (or present), it will plot the GFP.

I think this behaviour is potentially misleading, and I would expect the function to have the same defaults for different channels, i.e. mean of the evokeds. As you can see in #10465 , this created quite a bit of confusion for me (probably mainly due to me being new to ERP analysis and not knowing what GFP meant).

I see this has previously already spiked a bit of discussion (e.g. #3393) and was introduced in #6166. By now, the gfp=... parameter has been removed in favor of the combine=None parameter, which defaults to a different value depending on the present/chosen channels.

I would suggest either

  • make combine have the same default for all cases
  • make combine an arg, i.e. make users forcefully choose a combination mode

Additionally, the docstring should reflect the importance of the combine parameter.

What are your thoughts on this?

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
ktavabicommented, Aug 3, 2022

On a tangent, I am thinking of simplifying the nave proportions algebra in evoked. comment for the results from plot_compare_evokdes to make a more informative legend. Here is an, e.g., output screenshot

Screen Shot 2022-08-02 at 5 09 25 PM

The text in evoked.comment renders unusable image file formats unless figure legends are dealt with on the fly. If that’s the intended usage, then disregard this. Otherwise, I am curious if a fix is a suitable task to piggyback here?

Resulting .png compare-evokeds

1reaction
agramfortcommented, Mar 30, 2022

@skjerns the docstring at https://mne.tools/stable/generated/mne.viz.plot_compare_evokeds.html says:

image

so maybe the API in counterintuitive but I think the docstring is explicit no?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Will a Default Be Removed if Paid? - Experian
When you default, it will remain on your credit report for seven years ... This means that the lender will take ownership of...
Read more >
Default Notices, Missed Payments & Credit File. StepChange
What happens when you get a default notice? Your creditor will ask you to pay the full amount of the debt instead of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found