libtcspc.ExtractBucket¶
- final class libtcspc.ExtractBucket(event_type)[source]¶
Bases:
NodeProcessor that extracts the bucket carried by a bucket-carrying event.
Pulls the
data_bucketfield out of eachevent_typeand emits it as aBucketEvent. Use this to obtain the result ofHistogramorScanHistogramsas a bare NumPy array. Alternatively, bucket-carrying events can be sent to a Python sink directly, where they are delivered asEventInstancevalues; preferExtractBucketwhen only the array (not the event wrapper) is of interest.- Parameters:
event_type (EventType) – The bucket-carrying event type to extract from. The input event set must consist only of this type, which must carry a
data_bucket.
Notes
Events handled:
Events matching
event_type: emit the carried bucket as aBucketEvent.All other event types: rejected at graph build time.
End of input: pass through.
See also
- tcspc::extract_bucket()
The underlying C++ factory function.