Repository navigation
FIX resampling events indices - #6247
Conversation
|
Can you add a test? |
Does this suffice? |
|
I think the test failing is unrelated to this PR. |
|
please look for the test function that uses the code you changed. this test should be changed to is breaks on master and works with this pull request. thanks |
|
I have restarted the single failing Travis build just to make sure. |
Codecov Report
@@ Coverage Diff @@
## master #6247 +/- ##
=========================================
Coverage ? 89.17%
=========================================
Files ? 415
Lines ? 74895
Branches ? 12345
=========================================
Hits ? 66791
Misses ? 5223
Partials ? 2881 |
|
Restarted Travis is green now. |
|
@jeythekey do you see what Alex says about adding a test? Or do you need more support? |
|
OK, the test should hopefully show the issue now. I am sorry, I wasn't aware of the rule, that every PR needs to come with a test obligatorily. (This could also be more explicit about this.). I also didn't know that I don't have to mimic the old behavior myself in a test, that makes of course things much more comfortable. So, thanks for the advices! |
|
@jeythekey can you see why travis complains? I suspect pep8 errors |
|
travis is still not happy. You'll need to update what's new. I'll let @larsoner confirm that it's actually a bug. He knows this code more than me. thx |
|
@jona-sassenhagen Could you restart travis again, please? (I think some network/loading problem). Is anything missing here besides whats_new? |
|
Argh missed the |
|
Can I include the whats-new in this PR: #6246, which hopefully can be merged soon as well? |
|
Yes that should be fine |
* Fix sorting in descending order in ica._detect_artifacts (was sortin in ascending order). * Fix sfreq selection in ica._band_pass_filter (called (only) in ica.score_sources to filter sources and targets) to use the raw sfreq rather than the one used for fitting the ica. * Incorporate missed suggestion from #5620 + summary of discussion * fix PEP8 * fix typo in doc * Allow both exclude and ica.exclude to be array_like by always converting to list first. * ica.detect_artifacts: Corrected doc according to code and changed some default values to yield the same compos as before * Added test for checking descending sorting in detect_artifacts for integer criterion * Stylistic improvements thanks to jona-sassenhagen * Fix test for score-sorting * pep8 and whats_new.rst * Remove links to privat funcs in whats_new.rst * fix links in whats_new * STY: No end period * Futher improvements thanks to mmagnuski and a few further corrections in the docstrings of run_ica and detect_artifacts * Added warning for new sorting-direction in detect_artifacts; added whats_new from #6247 * improve bug section; remove warning again; typo
This is a one-character fix for inst.resample, when also resampling events.
The ceiling-check of the max. index of the resampled events was missing a -1, so e.g. cropping to the same data-segment between two events before and and again after resampling resulted in an error.