Skip to content

added noisy_channels_before and _after interpolation attributes - #45

Merged
sappelhoff merged 7 commits into
sappelhoff:masterfrom
yjmantilla:detailed_criteria
Dec 9, 2020
Merged

sappelhoff merged 7 commits into
sappelhoff:masterfrom
yjmantilla:detailed_criteria

Conversation

@yjmantilla

@yjmantilla yjmantilla commented Dec 4, 2020 •

Copy link
Copy Markdown
Collaborator

Thanks for contributing.
If this is your first time, please make sure to read the contributing guideline.

PR Description

This PR adds two attributes to PrepPipeline:

  • noisy_channels_before_interpolation
  • noisy_channels_after_interpolation

Which are dictionaries with the detailed results of bad channels identified by each criteria, that is:

noisy_channels_x_x = {
            "bad_by_nan": noisy_detector.bad_by_nan,
            "bad_by_flat": noisy_detector.bad_by_flat,
            "bad_by_deviation": noisy_detector.bad_by_deviation,
            "bad_by_hf_noise": noisy_detector.bad_by_hf_noise,
            "bad_by_correlation": noisy_detector.bad_by_correlation,
            "bad_by_SNR": noisy_detector.bad_by_SNR,
            "bad_by_dropout": noisy_detector.bad_by_dropout,
            "bad_by_ransac": noisy_detector.bad_by_ransac,
            "bad_all": noisy_detector.get_bads(),
        }

closes #20

Also added two keys to PrepPipeline.noisy_channels_original:

  • bad_by_dropout
  • bad_by_SNR

A test for the IOError when not enough channels to make predictions in ransac was implemented.

Merge Checklist

To merge your PR we need to first take the following points into account:

  • 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

@yjmantilla
yjmantilla requested a review from sappelhoff December 4, 2020 23:42
@codecov-io

codecov-io commented Dec 4, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #45 (a518e73) into master (afc8190) will increase coverage by 0.40%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   96.36%   96.76%   +0.40%     
==========================================
  Files           5        5              
  Lines         523      526       +3     
==========================================
+ Hits          504      509       +5     
+ Misses         19       17       -2     
Impacted Files Coverage Δ
pyprep/find_noisy_channels.py 96.49% <ø> (+0.76%) ⬆️
pyprep/prep_pipeline.py 100.00% <100.00%> (ø)
pyprep/reference.py 96.39% <100.00%> (+0.06%) ⬆️

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 afc8190...a518e73. 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.

LGTM! A few comments before we can get it in.

Comment thread pyprep/find_noisy_channels.py Resolved
Comment thread pyprep/prep_pipeline.py Resolved
Comment thread docs/whats_new.rst Resolved
@yjmantilla

Copy link
Copy Markdown
Collaborator Author

This PR will be quiet for a bit since Im on finals. Around the 19 of December I will work on it again

@sappelhoff

Copy link
Copy Markdown
Owner

Okay, thanks for the note and good luck!

@yjmantilla
yjmantilla requested a review from sappelhoff December 9, 2020 06:11
@yjmantilla

yjmantilla commented Dec 9, 2020 •

Copy link
Copy Markdown
Collaborator Author

Was about to fix the whole whats new (implement the sphinx syntax along all of the document) but then thought that it was better to fix it once we know what happened to #46 so that we (I) can be sure of doing this stuff correctly.

@sappelhoff

Copy link
Copy Markdown
Owner

Was about to fix the whole whats new (implement the sphinx syntax along all of the document) but then thought that it was better to fix it once we know what happened to #46 so that we (I) can be sure of doing this stuff correctly.

yes 👍 most of the time it's good to do it in a separate, targeted PR.

@sappelhoff
sappelhoff merged commit dd618a3 into sappelhoff:master Dec 9, 2020
@sappelhoff

Copy link
Copy Markdown
Owner

Thanks @yjmantilla

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

We should be able to see the result of each criteria in the prepPipeline object.

3 participants