-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add additional automatic detection of the trigger based on time-domain analysis #391
Add additional automatic detection of the trigger based on time-domain analysis #391
Conversation
Codecov Report
@@ Coverage Diff @@
## master #391 +/- ##
==========================================
+ Coverage 94.77% 94.81% +0.03%
==========================================
Files 8 8
Lines 862 868 +6
==========================================
+ Hits 817 823 +6
Misses 45 45
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @drombas ! This is great and definitely makes phys2bids more robust.
I would like to have a couple of tiny changes made before approving this PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great. Thanks @drombas !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Hopefully the failing test will pass when merged into master
.
But please check them out before merging! |
I will! I'm reading the guidelines too because I have completely forgotten about how we name PRs lol. |
Is it ok? |
Yeah, that looks good. Thanks! |
Ok, apparently the readthedocs fail is not related to the PR (other PR have the same issue and none of them is touching documentation). We'll need to have a look at readthedocs and understand what changed. |
Thanks for looking into it. I'm really busy today. I'll merge then. |
🚀 PR was released in |
Related to #204 and #386.
This implements a time-domain detection of the trigger when the text-matching detection fails.
Proposed Changes
The implementation computes a metric measuring how much each channel differs from a binary signal. The metric is computed as the average distance from each point to the closest limit of the signal (min or max).
More "binary-like" signals like the trigger should have most of the points closer to either signal limit resulting on a smaller metric. Assuming this, the trigger is detected as the channel that minimizes the metric.
Changes regarding the chtrig=0 are part of #390 (hope it is not confusing).
Change Type
bugfix
(+0.0.1)minor
(+0.1.0)major
(+1.0.0)refactoring
(no version update)test
(no version update)infrastructure
(no version update)documentation
(no version update)other
Checklist before review