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)
returnsunderflow_bin
if theval
is less than the lower edge of the lowest bin. - underflow_bin (optional) – The underflow bin. When
min
is given, the__call__(val)
returnsunderflow_bin
if theval
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 whenmax
is one of boundaries. It must be a positive value. Whenmax
is one of boundaries, the highest bin is the bin whose upper edge ismax
. If given,__call__(val)
returns the overflow bin if theval
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 thanTrue
. Ifoverflow_bin
isTrue
, the overflow bin will be the upper edge of the highest bin. Whenmax
is given, the__call__(val)
returns the overflow bin if theval
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)