Skip to content

Possible (small) errors in ERDS maps example #11895

Closed

Description

@cbrnr

I just noticed the following two issues in our ERDS maps example:

  1. The last two plots include "ERDS (%)" as their y axes labels. I think this is not correct, since the ERDS values are not in %. There are two options: we can either convert ERDS values to %, or drop the "(%)" from the labels.
  2. I am not sure why the last plot shows negative values up to about -2, because the minimum possible ERD value is -1 (-100%, meaning power during activity completely disappeared as compared to baseline). Is this a visualization artifact of the violin plots?

@eioe do you have time to take a look?

Activity

  1. eioe commented on Aug 17, 2023

    @eioe
    Contributor

    Hi @cbrnr ,
    thanks for spotting these. I will try to take a look tonight or tomorrow.
    If I'm too slow to get to a satisfying solution, I'd write here again as I'm then off for 4 weeks of vacation (starting tomorrow evening).

  2. eioe commented on Aug 17, 2023

    @eioe
    Contributor

    Qucik question though:

    I think my reasoning/labelling was based on this line:

    tfr.crop(tmin, tmax).apply_baseline(baseline, mode="percent")

    Doesn't that express the values in %-change re. the baseline?

  3. cbrnr commented on Aug 17, 2023

    @cbrnr
    ContributorAuthor

    Good point! It seems like this is a bit of a misnomer, because according to the docs, this mode performs "subtracting the mean of baseline values followed by dividing by the mean of baseline values (‘percent’)". It doesn't say that values are multiplied by 100%, which you can also see in the source.

  4. eioe commented on Aug 19, 2023

    @eioe
    Contributor

    @cbrnr , thanks a lot for the clarification. I read that in the docs, but did not pay enough attention to realize that we're missing the multiplication with 100. Indeed, a bit misleading naming.
    Re. your first point: any of the two mentioned options sounds reasonable to me; with a slight preference for multiplying the values with 100 and keeping the "%" in the label, so that we have some kind of a unit on the axis label. What do you think?

    Re. 2: Setting the parameter cut=0 in the call of sns.violinplot should yield the wanted behavior (e.g., in line 210 here). This is how it looks:

    image

    unfortunately, I did not find enough time today to set up a mne-dev environment on this machine here, so i could create a PR. And we are about to leave for our vacation.
    If it is ok for yout, I'm thankful if you go ahead and fix/adapt it. Or – if you prefer – I am happy to do it once I'm back, but that will only be mid september. Sorry, unfortunate timing.

    Thanks anyways & very cool that you spotted this. 🙌

  5. cbrnr commented on Aug 19, 2023

    @cbrnr
    ContributorAuthor

    Thanks @eioe, I've submitted a PR with the changes. I didn't convert the values to %, because this would have been more work (because I'd also need to change the t/f plots), so I've just fixed the y-axis labels. Have a great vacation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions