Skip to content

Retain detailed info about calculations during NoisyChannels - #68

Merged
sappelhoff merged 2 commits into
sappelhoff:masterfrom
a-hurst:more_noisy_info
Apr 19, 2021
Merged

sappelhoff merged 2 commits into
sappelhoff:masterfrom
a-hurst:more_noisy_info

Conversation

@a-hurst

@a-hurst a-hurst commented Apr 18, 2021 •

Copy link
Copy Markdown
Collaborator

PR Description

In MATLAB PREP, various values and matrices calculated during findNoisyChannels are saved as part of the resulting EEG object. These include the raw correlation values for each RANSAC window and each correlation window, the calculated noisiness and deviations for each channel, the dropout windows, and more. MATLAB PREP also does some extra calculations with some of this data when generating reports that otherwise isn't used in bad channel detection (e.g. reporting the specific windows of high frequency noise across each channel). Here's what MatPREP retains for the initial, pre-interpolation, and post-interpolation findNoisyChannels runs:

Screen Shot 2021-04-18 at 7 53 29 PM

This PR makes PyPREP retain most of the same detailed info.

The immediate purpose of the PR is that this will make it a lot easier to do proper and detailed unit tests, especially for comparing values between PyPREP and MATLAB PREP. Instead of just testing channel detection output, we can now test whether specific values match up with what we expect.

The other purpose of the PR is that (at some point) we might want to make this part of the public API, so that people can access and dig into these values like they can with MATLAB PREP, and/or add functions to do the additional calculations with some of this data the way MatPREP does.

Merge Checklist

  • the PR has been reviewed and all comments are resolved
  • all CI checks pass
  • (if applicable): the PR description includes the phrase closes #<issue-number> to automatically close an issue
  • (if applicable): bug fixes, new features, or API changes are documented in whats_new.rst

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@032cad1). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #68   +/-   ##
=========================================
  Coverage          ?   97.05%           
=========================================
  Files             ?        7           
  Lines             ?      578           
  Branches          ?        0           
=========================================
  Hits              ?      561           
  Misses            ?       17           
  Partials          ?        0           
Impacted Files Coverage Δ
pyprep/find_noisy_channels.py 96.53% <100.00%> (ø)
pyprep/reference.py 96.52% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 032cad1...9b92e5c. Read the comment docs.

@sappelhoff sappelhoff left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Good idea, that'll be useful for both things you mention (unit tests, later "reports" for users).

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.

3 participants