libtcspc.DetectionPairEvent¶
- class libtcspc.DetectionPairEvent(numeric_traits=None)[source]¶
Bases:
EventTypeEvent representing a pair of detections (a start and a stop).
Emitted by the
PairAll,PairOne,PairAllBetween, andPairOneBetweenprocessors, and consumed by theTimeCorrelateAtStart,TimeCorrelateAtStop,TimeCorrelateAtMidpoint, andTimeCorrelateAtFractionprocessors.- Parameters:
numeric_traits (NumericTraits or None) – Set of integer types parameterising the C++ event.
None(the default) usesNumericTraitsdefaults.
Notes
The corresponding C++ event is
std::array<tcspc::detection_event, 2>; element 0 is the start detection and element 1 is the stop detection.A value is constructed with the single field
elements, given as a sequence of exactly twoDetectionEventEventInstancevalues (the start and the stop):DetectionPairEvent(nt).value(elements=[start, stop])
When delivered to a Python sink (or read back),
elementsis a tuple of twoDetectionEventEventInstancevalues; anEventInstanceof this type also supportslen(...)and indexing.Constructing and inspecting individual event values from Python is intended for debugging and learning only and is extremely slow; production graphs process events in compiled C++ and exchange bulk data via buckets.
See also
DetectionEventThe element type of the pair.
ArrayEventTypeThe generic fixed-size-array event type this specializes.