Repository navigation
Add initial tests for removeTrend & NoisyChannels - #79
Conversation
Codecov Report
@@ Coverage Diff @@
## master #79 +/- ##
==========================================
+ Coverage 97.81% 98.37% +0.56%
==========================================
Files 7 7
Lines 686 677 -9
==========================================
- Hits 671 666 -5
+ Misses 15 11 -4
Continue to review full report at Codecov.
|
sappelhoff
left a comment
There was a problem hiding this comment.
Thanks for the start :)
. One possibility would be to try and find another test file that's noisier, another would be to try and simulate these types of noise as part of our matlab_artifacts script.
I think testing 2 to 3 files instead of just one wouldn't hurt -> do you think that's feasible?
but I haven't found any data with bad-by-NaN or bad-by-dropout channels
I am not aware of such data either: just editing on of our datasets to contain NaN / dropout (whatever that is supposed to mean) might be fine enough?
What do we want to do about the examples/run_full_prep.py script? Once #58 is finally finished it'll need to be rewritten a bit, but should we switch to using matprep_artifacts as the test data for that as well?
Yes, we should switch to matprep data there as well - and the plotting code needs to be a little bit less "in your face"
How do we want to approach merging this? Should I write tests for the whole thing and mark the ones that aren't numerically-equivalent yet as expected failures, or should we merge once NoisyChannels tests are complete and add to this with future PRs when adding matlab_strict modes for things like re-referencing and final interpolation?
I think doing separate PRs would be a better way to go here. Add now what we can assure passes, and do the rest later
52f12dc to
0ec7cff
Compare
|
@sappelhoff I've now switched Due to differences in how PyPREP and MatPREP generate their arrays of internal info, I also had to refactor Also I'm not sure what to do about the style check throwing the error: for that line, |
|
I think codecov's upset I uncommented an untested line in |
sappelhoff
left a comment
There was a problem hiding this comment.
awesome work, thanks heaps :)
I think this is worth a big What's New entry, WDYT? -> or do you want to hold off with that until all things PREP are tested in CI?
Regarding the latter, where are we going to track the as of yet not tested in CI parts of PYPREP (to be done in later PRs)?
|
Just updated the For tracking the rest of the comparisons, I'd say we can use the checklist in #58 as a rough test coverage tracker, since it's essentially in the same state and I can add MATLAB-comparison tests as the remaining boxes in there get checked off. |
|
Great, thanks! |
PR Description
Closes #49. This PR aims to add direct CI comparison of PyPREP's
matlab_strictresults to Matlab PREP's across every stage of the pipeline, verifying that we're not deviating from MatPREP in any ways we're not actively aware of.This is currently in a draft state, with only removeTrend and NoisyChannels being tested for equivalence, but I figure this would be a useful stage at which to get some feedback.
Components currently tested
mne.filter.notch_filter)Current thoughts
matlab_artifactsscript. Simulating bad-by-SNR is likely more trouble than just finding a noisier file, but I haven't found any data with bad-by-NaN or bad-by-dropout channels yet so I think simulation is the way to go for those.examples/run_full_prep.pyscript? Once Numeric equivalence with MATLAB PREP #58 is finally finished it'll need to be rewritten a bit, but should we switch to usingmatprep_artifactsas the test data for that as well?matlab_strictmodes for things like re-referencing and final interpolation?Merge Checklist
closes #<issue-number>to automatically close an issue