Repository navigation
ENH: Show rejection and flat thresholds in Report.add_epochs - #14448
Merged
larsoner merged 4 commits intoOct 23, 2026
Merged
Conversation
|
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
sruthisureshkumar-arch
requested review from
agramfort,
drammock and
larsoner
as code owners
October 23, 2026 08:06
larsoner
requested changes
Oct 23, 2026
larsoner
left a comment
Member
There was a problem hiding this comment.
14448.newfeature.rst appears blank as well?
sruthisureshkumar-arch
force-pushed
the
report-reject-thresholds
branch
from
October 23, 2026 18:16
2524dbe to
b9277d1
Compare
larsoner
approved these changes
Oct 23, 2026
Member
|
Marking for squash+merge-when-green, thanks in advance @sruthisureshkumar-arch ! |
larsoner
enabled auto-merge (squash)
October 23, 2026 18:55
|
🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference issue (if any)
Closes #12396.
What does this implement/fix?
What I've added :
a new “Rejection thresholds” table in
Report.add_epochsthat we can see just above the Drop log that appears only when epochs were actually rejected (epochs._bad_dropped) this is automatically added, with no additional parameters, just as @larsoner suggestedThe table shows:
one row per channel type with two columns that is - the reject value and the flat values in readable units, e.g. 350 µV instead of 0.00035 and also a custom rejection function shows as “custom function” and when no thresholds were used, no table is added.
I've combined the rejects and flats in the table and not as separate entries as @larsoner mentioned to make it easier to compare side by side but if necessary I can easily change the design to that instead!
Also, this picks up from #13617, which was closed and it adds a test,
test_add_epochs_reject_thresholds, covering numbers with units, a custom function, and no thresholds.Additional information
Disclosure:

Claude (Opus 5.5) drafted the first implementation and the tests, and I built on it, fixed style issues, ran the tests and the report locally, checked the output, and understand every line that was incorporated in the fix.
Here is the attached image of the output ran locally->