Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad-by-dropout channels sometimes ignored during Reference #97

Open
a-hurst opened this issue Jun 27, 2021 · 0 comments
Open

Bad-by-dropout channels sometimes ignored during Reference #97

a-hurst opened this issue Jun 27, 2021 · 0 comments
Milestone

Comments

@a-hurst
Copy link
Collaborator

a-hurst commented Jun 27, 2021

As mentioned in #93 (specifically this comment), both PREP and PyPREP don't flag bad-by-dropout channels as bad or unusable on the first pass before average referencing. The problem with this is that after average referencing, the dropout regions in any bad-by-dropout channels likely aren't going to be completely flat anymore, so they're unable to be detected unless the bad-by-correlation detector manages to flag them.

To fix this, it seems like initial bad-by-dropout channels should be added to the initial noisy channels state here unless matlab_strict is True:

pyprep/pyprep/reference.py

Lines 219 to 230 in 3625b26

# Initialize channels to permanently flag as bad during referencing
noisy = {
"bad_by_nan": noisy_detector.bad_by_nan,
"bad_by_flat": noisy_detector.bad_by_flat,
"bad_by_deviation": [],
"bad_by_hf_noise": [],
"bad_by_correlation": [],
"bad_by_SNR": [],
"bad_by_dropout": [],
"bad_by_ransac": [],
"bad_all": [],
}

What do you think?

@a-hurst a-hurst added this to the 0.5.0 milestone Jun 27, 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

No branches or pull requests

1 participant