libtcspc.CheckMonotonic

final class libtcspc.CheckMonotonic(data_types=None)[source]

Bases: Node

Pass-through processor that checks event timestamps are non-decreasing.

For each event that carries an abstime field, this processor checks that the timestamp is greater than or equal to the previous one. On violation, a WarningEvent is 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:

data_types (DataTypes or None) – Data type set specifying the abstime type expected on input events. Defaults to DataTypes().

Notes

Events handled:

  • Events with an abstime field: check that abstime is non-decreasing; if violated, emit a WarningEvent just before the offending event, then pass through.

  • All other event types: pass through unchanged.

  • End of input: pass through.

See also

tcspc::check_monotonic()

The underlying C++ factory function.