Processor nodes

Built-in processor nodes, grouped by category.

Core processors

Basic and generic processors.

libtcspc.SinkAll

Sink that discards every event it receives.

libtcspc.SourceNothing

Source processor that emits no events.

libtcspc.Prepend

Pass-through processor that inserts an event at the start of the stream.

libtcspc.Append

Pass-through processor that inserts an event at the end of the stream.

Filtering processors

Processors for filtering events.

libtcspc.Gate

Pass-through processor that gates events depending on open/close state.

libtcspc.Select

Processor that passes only events of the listed types, dropping others.

libtcspc.SelectAll

Pass-through processor that forwards every event unchanged.

libtcspc.SelectExcept

Processor that discards events of the listed types, passing others.

libtcspc.SelectNone

Processor that discards every event.

Batching and unbatching processors

Processors that aggregate events into batches or extract individual events from batches.

libtcspc.Batch

Processor that groups events into fixed-size buckets.

libtcspc.BatchBinIncrementClusters

Processor that collects bin increment clusters into encoded batches.

libtcspc.Unbatch

Processor that emits the elements of bucketed batches one at a time.

libtcspc.UnbatchBinIncrementClusters

Processor that recovers bin increment clusters from encoded batches.

Multiplexing and demultiplexing processors

Processors that combine events of different types into a variant type and back.

libtcspc.Multiplex

Processor that wraps events of several types into a single variant type.

libtcspc.Demultiplex

Processor that unwraps a variant type back to individual event types.

Buffering processors

Processors that buffer events to decouple upstream and downstream processing.

libtcspc.ProcessInBatches

Processor that buffers a single event type into fixed-size batches and re-emits it.

libtcspc.Buffer

Processor that buffers a single event type for emission on another thread.

libtcspc.RealTimeBuffer

Processor that buffers events for emission on another thread, with bounded latency.

Stopping processors

Processors that stop processing when a given event is received.

libtcspc.Stop

Pass-through processor that ends the stream normally on a configured event.

libtcspc.StopWithError

Pass-through processor that ends the stream with an error on a configured event.

Branching processors

Processors for splitting the processing graph.

libtcspc.Broadcast

Broadcasts every event to several downstream processors.

libtcspc.Route

Routes events to one of several downstreams via a Router, broadcasting the rest.

Merging processors

Processors for combining several branches of the processing graph.

libtcspc.Merge

Merges two sorted input streams into one, ordered by abstime.

libtcspc.MergeN

Merges N sorted input streams into one, ordered by abstime.

libtcspc.MergeNUnsorted

Merges N input streams by passing events through in arrival order.

Input and output processors

Processors for reading and writing data from/to file-like streams.

libtcspc.ExtractBucket

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

libtcspc.ReadBinaryStream

Source processor that reads events from a binary input stream.

libtcspc.WriteBinaryStream

Sink processor that writes raw bytes to a binary output stream.

libtcspc.read_events_from_binary_file

Build a subgraph that reads events from a binary file and emits them one at a time.

libtcspc.write_events_to_binary_file

Build a subgraph that writes events to a binary file.

Binary stream processors

Processors for converting between events and binary data streams.

libtcspc.BatchFromBytes

Processor that copies batches of bytes into batches of typed events.

libtcspc.UnbatchFromBytes

Processor that emits typed events one-at-a-time from batches of bytes.

libtcspc.ViewAsBytes

Processor that emits the in-memory bytes of bucketed events.

Acquisition processors

Processors for acquiring data from hardware devices.

libtcspc.Acquire

Source processor that acquires data into buckets via a pull-style reader.

libtcspc.AcquireFullBuckets

Source processor that acquires data into fixed-size buckets while also delivering real-time read-only views.

libtcspc.CopyToBuckets

Processor that copies pushed data into buckets.

libtcspc.CopyToFullBuckets

Processor that copies pushed data into fixed-size buckets while also delivering real-time read-only views.

Decoding processors

Processors for decoding device events.

Becker & Hickl decoding processors

Processors for decoding Becker & Hickl SPC device events.

libtcspc.DecodeBHSPC

Processor that decodes Becker & Hickl SPC FIFO records into libtcspc TCSPC events.

libtcspc.DecodeBHSPCWithIntensityCounter

Processor that decodes BH SPC FIFO records including fast intensity counter.

libtcspc.DecodeBHSPC600_256ch

Processor that decodes BH SPC-600/630 32-bit FIFO records (256-channel mode).

libtcspc.DecodeBHSPC600_4096ch

Processor that decodes BH SPC-600/630 48-bit FIFO records (4096-channel mode).

PicoQuant decoding processors

Processors for decoding PicoQuant T2 and T3 device events.

libtcspc.DecodePQT2Generic

Processor that decodes PicoQuant T2 (Generic) FIFO records.

libtcspc.DecodePQT2PicoHarp300

Processor that decodes PicoQuant PicoHarp 300 T2 FIFO records.

libtcspc.DecodePQT2HydraHarpV1

Processor that decodes PicoQuant HydraHarp V1 T2 FIFO records.

libtcspc.DecodePQT3Generic

Processor that decodes PicoQuant T3 (Generic) FIFO records.

libtcspc.DecodePQT3PicoHarp300

Processor that decodes PicoQuant PicoHarp 300 T3 FIFO records.

libtcspc.DecodePQT3HydraHarpV1

Processor that decodes PicoQuant HydraHarp V1 T3 FIFO records.

Swabian decoding processors

Processors for decoding Swabian Time Tagger device events.

libtcspc.DecodeSwabianTags

Processor that decodes 16-byte Swabian Time Tagger tags.

Timeline processors

Processors for managing and manipulating the absolute timeline.

libtcspc.Delay

Pass-through processor that offsets event abstimes by a constant delta.

libtcspc.RebaseAbstime

Pass-through processor that shifts abstime so the first event is at zero.

libtcspc.RegulateTimeReached

Processor that regulates the frequency of TimeReachedEvent.

Timing signal processors

Processors for transforming timing signal events.

libtcspc.CountDownTo

Processor that counts down on a tick event and fires when a threshold is reached.

libtcspc.CountUpTo

Processor that counts up on a tick event and fires when a threshold is reached.

libtcspc.Generate

Processor that generates timing events in response to a trigger.

libtcspc.Match

Processor that emits an output event for each matched event, passing all through.

libtcspc.MatchAndConsume

Processor that emits an output event for each matched event, consuming matches.

Timing signal modeling processors

Processors for fitting and synthesizing periodic timing sequences.

libtcspc.AddCountToPeriodicSequences

Processor that converts periodic sequence model events to linear timing events.

libtcspc.ConvertSequencesToStartStop

Processor that converts tick sequences to gapless start-stop event pairs.

libtcspc.ExtrapolatePeriodicSequences

Processor that extrapolates a periodic sequence to a one-shot timing event.

libtcspc.FitPeriodicSequences

Processor that fits fixed-length periodic sequences and estimates timing.

libtcspc.RetimePeriodicSequences

Processor that normalizes the abstime of periodic sequence model events.

Time correlation processors

Processors for time correlation.

libtcspc.RecoverOrder

Pass-through processor that sorts events by abstime within a time window.

libtcspc.RemoveTimeCorrelation

Processor that strips the difftime from time-correlated detection events.

libtcspc.TimeCorrelateAtFraction

Processor that time-correlates detection pairs at a fractional position.

libtcspc.TimeCorrelateAtMidpoint

Processor that time-correlates detection pairs using the midpoint time.

libtcspc.TimeCorrelateAtStart

Processor that time-correlates detection pairs using the start time and channel.

libtcspc.TimeCorrelateAtStop

Processor that time-correlates detection pairs using the stop time and channel.

Pairing processors

Processors for pairing detection events.

libtcspc.PairAll

Processor that pairs each start detection with all stops within a window.

libtcspc.PairAllBetween

Processor that pairs starts with all stops occurring before the next start.

libtcspc.PairOne

Processor that pairs each start with at most one stop per stop channel.

libtcspc.PairOneBetween

Processor that pairs starts with one stop per channel before the next start.

Binning processors

Processors for mapping events to datapoints and histogram bins.

libtcspc.ClusterBinIncrements

Processor that collects bin increments between start and stop events into clusters.

libtcspc.MapToBins

Processor that maps datapoint events to bin increment events.

libtcspc.MapToDatapoints

Processor that maps events to datapoint events using a data mapper.

Histogramming processors

Processors for accumulating histograms.

libtcspc.Histogram

Processor that accumulates a histogram from bin increment events.

libtcspc.ScanHistograms

Processor that accumulates an array of histograms over a scan.

Validation processors

Processors for data validation.

libtcspc.CheckAlternating

Pass-through processor that checks two event types alternate.

libtcspc.CheckMonotonic

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

Statistics processors

Processors for collecting statistics.

libtcspc.Count

Processor that counts events of a given type, passing every event through.

libtcspc.RecordAbstimeRange

Processor that records the range of abstime observed.

libtcspc.RecordLast

Processor that remembers the last event of a given type.

Testing processors

Processors for unit testing of processors.

libtcspc.SinkOnly

Sink that accepts and discards a fixed set of event types.