-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-1404: Handle monitor delay errors
In order to compute monitor delay, a sync square monitored by a photodiode changes state every 60 frames ('sentinel event'). Each transition from a rise/fall to a fall/rise ('photodiode event') represents a change in the state of the sync square. Previously only consecutive falling edges of the photodiode were used to determine whether the photodiode events triggered by sentinel frames had started. Only a falling edge was allowed to be the final event in a photodiode stream, even though it is possible that the last valid event could be a rising edge. This led sometimes to missing valid events, and resulted in an error (because the number of sentinel frames should match the number of photodiode events). The algorithm has been updated to examine consecutive events instead of relying on a specific edge type. A transition marks a sentinel frame if the next photodiode transition is roughly 1.0s after the previous or 1.0s before the next. Due to noisy data we can't just look for all contiguous events of this type. Instad we mark the beginning and end of the photodiode event stream as follows: 1. The first valid photodiode event is the first event where the time between the next two consecutive events are ~1.0s 2. The last valid photodiode event is the final event where the last event where the time between the previous two consecutive events are ~1.0s Update the logging to show the min, max, and std delay. No longer use a default value, but throw an error if there are data issues or the value computed is outside expected range.
- Loading branch information
1 parent
57b67b2
commit 941df71
Showing
2 changed files
with
214 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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