libtcspc.UniqueBinMapper

class libtcspc.UniqueBinMapper(access_tag, max_bin_index, numeric_traits=None)[source]

Bases: BinMapper

Bin 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 UniqueBinMapperAccessor obtained from the ExecutionContext using access_tag.

Parameters:
  • access_tag (AccessTag) – Tag used to retrieve a UniqueBinMapperAccessor from the ExecutionContext at 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_type and bin_index_type. Defaults to NumericTraits(). The run-time access requires the default datapoint_type.

See also

tcspc::unique_bin_mapper

The underlying C++ bin mapper.

UniqueBinMapperAccessor

Runtime accessor providing values().