-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Drop log handling in sliced epochs not intuitive #9726
Comments
I agree. Here is some more details:
basically the first 3 do not take the tag ignored and so you have 4 epochs and 57% are dropped... what would you suggest we do? |
I dont think there is a straightforward/satisfying solution. |
After thinking about it, an acceptable solution could be to simply add 'IGNORED' to the drop log to the channel tuple when epochs were rejected, e.g. |
I like this idea. You can try to implement it and see if it breaks any test
or tutorial.
If not you should be safe.
… |
When implementing this, there are two test failures in I could push a draft PR or just push the change in an actual PR, but the CI will then fail. |
Feel free to push if you are looking for help/collaboration/want someone else to take a stab at fixing The fix I would use is instead of comparing directly to (effectively) |
I pushed a draft PR #9768 . I have some issues with one unit test, which I think (maybe?) has a bug in it currently, but I am not sure and want to double check before changing a unit test. |
Describe the bug
Using
drop_log_stats()
ordrop_log
is unintuitive when working with sliced epochs.Steps to reproduce
MWE
Expected results
I would either expect the drop log stats to know the initial ratio of drops, i.e. 30%, or after slicing report only the dropped epochs in the slice, i.e. 0%. However, calculating the latter is hard for non-trivial drop/slice combinations.
Actual results
MNE remembers how many epochs were dropped initially, then ignores the epochs marked as IGNORED and calculates the drop log stats to be 75%, as 3 were dropped and the slice contains 1 non-dropped epoch.
I suspect that when doing slices of epochs, the
__getitem__
implementation only inserts('IGNORED')
in the drop log when there is no entry yet.Additional information
The text was updated successfully, but these errors were encountered: