Skip to content

"Bad by flat" threshold differs between PyPREP and Matlab PREP #59

Closed

Description

@a-hurst

In Matlab PREP, the criteria for a "flat" channel are that it either has a median absolute deviation below 10e-10 or a standard deviation below 10e-10.

In PyPREP this is mis-copied over as 1e-10, but there's an additional difference in that MNE and EEGLAB scale their raw data values differently, such that the first 2 samples in MATLAB are

[-3.7068, -4.8012, ...]

whereas in MNE they're

[-3.70680070e-06, -4.80121040e-06, ...].

Unless I'm doing the math wrong in my head, the correct equivalent threshold to use for PyPREP would therefore be 10e-16.

Activity

  1. sappelhoff commented on Apr 8, 2021

    @sappelhoff
    Owner

    Unless I'm doing the math wrong in my head, the correct equivalent threshold to use for PyPREP would therefore be 10e-16.

    Sounds good, but let's make it 1e-15, and add a comment # corresponds to 10e-10µV from PREP in Matlab. I think it's bad practice to do 10e-10, because you might as well go crazy and do 100e-11 or 1000e-12 then, 1e-9 is way clearer.

  2. added this to the 0.3.2 milestone on Apr 8, 2021
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions