alphatwirl.binning.RoundLog

class alphatwirl.binning.RoundLog(width=0.1, aboundary=1, min=None, underflow_bin=None, max=None, overflow_bin=None, valid=None)[source]

Binning with equal width in log scale

Parameters:
  • width (float or int, default 1) – The common logarithm (log10) of the width.
  • aboundary (float or int, optional) – A boundary. If not given, width/2 will be used.
  • min (float or int, optional) – The lowest bin will be the bin that min falls in. It must be a positive value. If given, __call__(val) returns underflow_bin if the val is less than the lower edge of the lowest bin.
  • underflow_bin (optional) – The underflow bin. When min is given, the __call__(val) returns underflow_bin if the val is less than the lower edge of the lowest bin.
  • max (float or int, optional) – The highest bin will be the bin that max falls in except when max is one of boundaries. It must be a positive value. When max is one of boundaries, the highest bin is the bin whose upper edge is max. If given, __call__(val) returns the overflow bin if the val is greater than or equal to the upper edge of the highest bin.
  • overflow_bin (optional) – The overflow bin if overflow_bin is any value other than True. If overflow_bin is True, the overflow bin will be the upper edge of the highest bin. When max is given, the __call__(val) returns the overflow bin if the val is greater than or equal to the upper edge of the highest bin.
  • valid (function, optional) – Boolean function to test if value is valid
__init__(width=0.1, aboundary=1, min=None, underflow_bin=None, max=None, overflow_bin=None, valid=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([width, aboundary, min, …]) Initialize self.
next(bin)