libtcspc.PowerOf2BinMapper¶
- class libtcspc.PowerOf2BinMapper(n_data_bits, n_histo_bits, flip=False, numeric_traits=None)[source]¶
Bases:
BinMapperBin mapper that discards the least significant bits of the datapoint.
Maps a datapoint of
n_data_bitssignificant bits to a bin index ofn_histo_bitsbits 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_bitsbins).flip (bool) – If
True, reverse the bin order. DefaultFalse.numeric_traits (NumericTraits or None) – Numeric traits specifying
datapoint_typeandbin_index_type. Defaults toNumericTraits().
See also
- tcspc::power_of_2_bin_mapper
The underlying C++ bin mapper.