Skip to content
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

Improve trigger threshold computation #211

Closed
smoia opened this issue Apr 14, 2020 · 1 comment · Fixed by #377
Closed

Improve trigger threshold computation #211

smoia opened this issue Apr 14, 2020 · 1 comment · Fixed by #377
Assignees
Labels
Enhancement New feature or request Good first issue Good for newcomers Hacktoberfest Issue/PR for hacktoberfest. Completing this issue/PR might not grant the all-contributor recognition

Comments

@smoia
Copy link
Member

smoia commented Apr 14, 2020

Detailed Description

While working on #206 @sangfrois and I realised that the current approach to compute the threshold fails for multi-runs recordings. Digging into the matter a bit deeper, I realised that this happens if, in absence of noise:

  • The average is different from zero and there are too many peak points, compared to the baseline points.
  • The average is different from zero and is considerable compared to the level the peaks get to.

As an easy fix, we could set the threshold to be one standard deviation from the average, instead of two standard deviations from the average.
Testing it a bit more with noisy signal, I realised that one standard deviation from average wouldn't be enough to proper threshold points if:

  • the noise is considerable compared to the level the peaks get to
  • the noise is not much, but there are not enough peak points
  • the noise is not much, but the average is not around zero.

A less easy fix in this case would be reconsidering the options in #173 and implement a different approach.

Possible Implementation

  1. We could simply retune the threshold as one standard deviation from the average of the trigger channel, OR
  2. We could implement a different approach, for instance the one based on distributions, OR
  3. We could do both, keep the standard deviation as "default" approach, and implement a different approach upon user request.

In case we decide to go for option 1, please relabel this issue as bug and the PR as BugFIX

@smoia smoia added the Enhancement New feature or request label Apr 14, 2020
@smoia smoia added Good first issue Good for newcomers Hacktoberfest Issue/PR for hacktoberfest. Completing this issue/PR might not grant the all-contributor recognition labels Oct 9, 2020
@smoia
Copy link
Member Author

smoia commented Oct 9, 2020

I'm adding GFI label since option 1 (retune threshold) is quite simple.
Basically, it would be about modifying a line in physio_obj.py.
If anyone is interested, I can help with the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Good first issue Good for newcomers Hacktoberfest Issue/PR for hacktoberfest. Completing this issue/PR might not grant the all-contributor recognition
Projects
None yet
2 participants