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])

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

find_node(val)

Find next node

Parameters:

val : Quantity

Lookup value

lin_center()[source]

Linear bin centers

log_center()[source]

Logarithmic bin centers

classmethod logspace(emin, emax, nbins, unit=None, **kwargs)[source]