
Pupil latency estimator sensitivity and resolvability audit
Source:R/113-measurement-accountability-0-11.R
pupil_latency_sensitivity.RdEstimates pupil-response latency using a sustained threshold, maximum-slope tangent intersection, and piecewise breakpoint. The result reports estimator spread and a sampling/noise-aware resolvability label rather than treating a single latency estimate as algorithm- or hardware-independent.
Arguments
- time
Numeric sample times in seconds.
- pupil
Numeric pupil values.
- event_time
Nominal event time in seconds.
- baseline_window
Two-element window relative to `event_time`.
- search_window
Two-element search window relative to `event_time`.
- direction
`"constriction"` or `"dilation"`.
- threshold_sigma
Robust-noise multiples used by the sustained threshold.
- sustain_ms
Required duration above threshold in milliseconds.