libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
Binning processors

Description

Processors for binning data for histogramming.

Functions

template<typename StartEvent, typename StopEvent, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::cluster_bin_increments (Downstream downstream)
 Create a processor collecting binned data into clusters.
template<typename DataTypes = default_data_types, typename BinMapper, typename Downstream>
auto tcspc::map_to_bins (BinMapper bin_mapper, Downstream downstream)
 Create a processor that maps datapoints to histogram bin indices.
template<typename Event, typename DataTypes = default_data_types, typename DataMapper, typename Downstream>
auto tcspc::map_to_datapoints (DataMapper mapper, Downstream downstream)
 Create a processor that maps arbitrary time-tagged events to datapoint events.

Function Documentation

◆ cluster_bin_increments()

template<typename StartEvent, typename StopEvent, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::cluster_bin_increments ( Downstream downstream)

Create a processor collecting binned data into clusters.

Template Parameters
StartEventstart-of-cluster event type
StopEventend-of-cluster event type
DataTypesdata type set specifying bin_index_type and emitted events
Downstreamdownstream processor type (usually deduced)
Parameters
downstreamdownstream processor
Returns
processor
Events handled
  • StartEvent: discard any unfinished cluster; start recording a cluster
  • StopEvent: ignore if not in cluster; finish recording the current cluster and emit as tcspc::bin_increment_cluster_event<DataTypes>
  • tcspc::bin_increment_event<DT>: record if currently within a cluster
  • All other types: pass through with no action
  • Flush: pass through with no action

◆ map_to_bins()

template<typename DataTypes = default_data_types, typename BinMapper, typename Downstream>
auto tcspc::map_to_bins ( BinMapper bin_mapper,
Downstream downstream )

Create a processor that maps datapoints to histogram bin indices.

Incoming tcspc::datapoint_events are mapped to tcspc::bin_increment_events according to BinMapper (see Bin mappers).

All other events are passed through.

Template Parameters
DataTypesdata type set for emitted events
BinMappertype of bin mapper (usually deduced)
Downstreamdownstream processor type (usually deduced)
Parameters
bin_mapperthe bin mapper
downstreamdownstream processor
Returns
processor
Events handled

◆ map_to_datapoints()

template<typename Event, typename DataTypes = default_data_types, typename DataMapper, typename Downstream>
auto tcspc::map_to_datapoints ( DataMapper mapper,
Downstream downstream )

Create a processor that maps arbitrary time-tagged events to datapoint events.

Incoming events of type Event are mapped to tcspc::datapoint_events according to DataMapper (see Data mappers).

All other events are passed through.

Template Parameters
Eventevent type to map to datapoints
DataTypesdata type set for emitted events
DataMappertype of data mapper (usually deduced)
Downstreamdownstream processor type (usually deduced)
Parameters
mapperthe data mapper
downstreamdownstream processor
Returns
processor
Events handled
  • Event: map to datapoint with data mapper and emit as tcspc::datapoint_event<DataTypes>
  • All other types: pass through with no action
  • Flush: pass through with no action