A capture holds exactly the buffered samples with triggerTime - pre <= t <= triggerTime + post. It starts from the live buffer when the trigger fires and grows
with each later batch until a sample at or past triggerTime + post has arrived;
then it is complete and nothing more is added. Samples are sorted by time (see
stream.ts), so the window is found by binary search.
NaN points (missing samples and gap markers) never fire a trigger, and a crossing
is judged against the last present sample before it.
Trigger detection and capture for the live plot.
A capture holds exactly the buffered samples with
triggerTime - pre <= t <= triggerTime + post. It starts from the live buffer when the trigger fires and grows with each later batch until a sample at or pasttriggerTime + posthas arrived; then it is complete and nothing more is added. Samples are sorted by time (seestream.ts), so the window is found by binary search.NaNpoints (missing samples and gap markers) never fire a trigger, and a crossing is judged against the last present sample before it.