libtcspc.UniqueBinMapper¶
- class libtcspc.UniqueBinMapper(access_tag, max_bin_index, numeric_traits=None)[source]¶
Bases:
BinMapperBin mapper that assigns a new bin index to each distinct datapoint.
Each datapoint value encountered is assigned the next available bin index, so that distinct values map to distinct bins. The mapping (the datapoint value assigned to each bin index) can be retrieved at run time via the
UniqueBinMapperAccessorobtained from theExecutionContextusingaccess_tag.- Parameters:
access_tag (AccessTag) – Tag used to retrieve a
UniqueBinMapperAccessorfrom theExecutionContextat run time.max_bin_index (int or Param[int]) – Largest allowed bin index (datapoints beyond this are discarded).
numeric_traits (NumericTraits or None) – Numeric traits specifying
datapoint_typeandbin_index_type. Defaults toNumericTraits(). The run-time access requires the defaultdatapoint_type.
See also
- tcspc::unique_bin_mapper
The underlying C++ bin mapper.
UniqueBinMapperAccessorRuntime accessor providing
values().