libtcspc.CheckMonotonic¶
- final class libtcspc.CheckMonotonic(numeric_traits=None)[source]¶
Bases:
NodePass-through processor that checks event timestamps are non-decreasing.
For each event that carries an
abstimefield, this processor checks that the timestamp is greater than or equal to the previous one. On violation, aWarningEventis emitted immediately before the offending event, which is itself then passed through. Useful for catching gross data-format problems, such as misinterpreting the record layout or reading binary data in text mode.- Parameters:
numeric_traits (NumericTraits or None) – Numeric traits specifying the
abstimetype expected on input events. Defaults toNumericTraits().
Notes
Events handled:
Events with an
abstimefield: check thatabstimeis non-decreasing; if violated, emit aWarningEventjust before the offending event, then pass through.All other event types: pass through unchanged.
End of input: pass through.
The output event set always includes
WarningEvent, even if the upstream event set does not.See also
- tcspc::check_monotonic()
The underlying C++ factory function.