libtcspc.PowerOf2BinMapper

class libtcspc.PowerOf2BinMapper(n_data_bits, n_histo_bits, flip=False, numeric_traits=None)[source]

Bases: BinMapper

Bin mapper that discards the least significant bits of the datapoint.

Maps a datapoint of n_data_bits significant bits to a bin index of n_histo_bits bits by right-shifting.

Parameters:
  • n_data_bits (int) – Number of significant bits in the datapoint.

  • n_histo_bits (int) – Number of bits in the bin index (the histogram has 2 ** n_histo_bits bins).

  • flip (bool) – If True, reverse the bin order. Default False.

  • numeric_traits (NumericTraits or None) – Numeric traits specifying datapoint_type and bin_index_type. Defaults to NumericTraits().

See also

tcspc::power_of_2_bin_mapper

The underlying C++ bin mapper.