BinnedDataAxis¶
-
class
gammapy.utils.nddata.
BinnedDataAxis
(lo, hi, **kwargs)[source]¶ Bases:
gammapy.utils.nddata.DataAxis
Data axis for binned data
Parameters: lo :
Quantity
Lower bin edges
hi :
Quantity
Upper bin edges
name : str, optional
Axis name, default: ‘Default’
interpolation_mode : str {‘linear’, ‘log’}
Interpolation behaviour, default: ‘linear’
Attributes Summary
bin_width
Bin width bins
Bin edges interpolation_mode
Interpolation mode nbins
Number of bins nodes
Evaluation nodes. unit
Axis unit Methods Summary
find_node
(val)Find next node lin_center
()Linear bin centers log_center
()Logarithmic bin centers logspace
(emin, emax, nbins[, unit])Create axis with equally log-spaced nodes Attributes Documentation
-
bin_width
¶ Bin width
-
bins
¶ Bin edges
-
interpolation_mode
¶ Interpolation mode
-
nbins
¶ Number of bins
-
nodes
¶ Evaluation nodes.
Depending on the interpolation mode, either log or lin center are returned
-
unit
¶ Axis unit
Methods Documentation
-
classmethod
logspace
(emin, emax, nbins, unit=None, **kwargs)[source]¶ Create axis with equally log-spaced nodes
if no unit is given, it will be taken from vmax, log interpolation is enable by default.
Parameters: vmin :
Quantity
, floatLowest value
vmax :
Quantity
, floatHighest value
bins : int
Number of bins
unit :
UnitBase
, strUnit
-