libtcspc.ExtractBucket

final class libtcspc.ExtractBucket(event_type)[source]

Bases: Node

Processor that extracts the bucket carried by a bucket-carrying event.

Pulls the data_bucket field out of each event_type and emits it as a BucketEvent. Use this to obtain the result of Histogram or ScanHistograms as a bare NumPy array. Alternatively, bucket-carrying events can be sent to a Python sink directly, where they are delivered as EventInstance values; prefer ExtractBucket when 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 a BucketEvent.

  • All other event types: rejected at graph build time.

  • End of input: pass through.

See also

tcspc::extract_bucket()

The underlying C++ factory function.