Skip to content

Change initial re-referencing state in Reference to match Matlab PREP - #78

Merged
sappelhoff merged 3 commits into
sappelhoff:masterfrom
a-hurst:matlab_init_reference
May 4, 2021
Merged

sappelhoff merged 3 commits into
sappelhoff:masterfrom
a-hurst:matlab_init_reference

Conversation

@a-hurst

@a-hurst a-hurst commented May 4, 2021 •

Copy link
Copy Markdown
Collaborator

PR Description

Closes #75 and closes #76. This PR fixes two separate (but related) issues:

  • Unlike PyPREP, MatPREP considers bad-by-SNR channels to be 'unuseable' for its initial average reference (in addition to bad-by-NaN and bad-by-flat channels)
  • Unlike PyPREP, MatPREP only flags the above "unusable" channels for permanent exclusion from being reference channels after the first noisy channels pass. PyPREP includes bad channels detected by all methods from this pass as permanently unusable, which doesn't necessarily make sense if the data isn't already average referenced (e.g. single-channel referenced or CMS/DRL).

With these fixes, PyPREP and Matlab PREP have identical values during re-referencing up until the second pass of NoisyChannels (see #74).

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

@a-hurst a-hurst linked an issue May 4, 2021 that may be closed by this pull request
@a-hurst

a-hurst commented May 4, 2021 •

Copy link
Copy Markdown
Collaborator Author

Looks like the Ubuntu check failed because it couldn't reach Physionet to download the test EDF. Is there any way to re-run without pushing another commit? (EDIT: found it)

EDIT 2: Looks like Physionet's having problems today, I've re-run this twice and have gotten the URL error on at least one runner every time...

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #78 (aac68c9) into master (339d90a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #78   +/-   ##
=======================================
  Coverage   97.49%   97.49%           
=======================================
  Files           7        7           
  Lines         678      678           
=======================================
  Hits          661      661           
  Misses         17       17           
Impacted Files Coverage Δ
pyprep/reference.py 96.55% <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 339d90a...aac68c9. Read the comment docs.

@sappelhoff

Copy link
Copy Markdown
Owner

Thanks a bunch!

Short info:

When you write

Closes #75 and #76.

then GH will only close the first one automatically once the PR is merged.

I edited this to:

Closes #75 and closes #76.

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.

PyPREP starts re-referencing with more 'bad' channels than Matlab PREP First-pass average referencing differs between PyPREP and Matlab PREP

3 participants