alphatwirl.binning.Round¶
-
class
alphatwirl.binning.
Round
(width=1, aboundary=None, min=None, underflow_bin=None, max=None, overflow_bin=None, valid=None)[source]¶ Equal width binning
Parameters: - width (float or int, default 1) – 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. 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. 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=1, aboundary=None, 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)