NDDataArray¶
-
class
gammapy.utils.nddata.
NDDataArray
(axes, data=None, meta=None, interp_kwargs=None)[source]¶ Bases:
object
ND Data Array Base class
- Parameters
- axeslist
List of
DataAxis
- data
Quantity
Data
- metadict
Meta info
- interp_kwargsdict
TODO
Attributes Summary
Array holding the axes in correct order
Array holding the n-dimensional data.
Default interpolation kwargs used to initialize the
scipy.interpolate.RegularGridInterpolator
.Dimension (number of axes)
Methods Summary
axis
(self, name)Return axis by name
evaluate
(self[, method])Evaluate NDData Array
Attributes Documentation
-
axes
¶ Array holding the axes in correct order
-
data
¶ Array holding the n-dimensional data.
-
default_interp_kwargs
= {'bounds_error': False, 'values_scale': 'lin'}¶ Default interpolation kwargs used to initialize the
scipy.interpolate.RegularGridInterpolator
. The interpolation behaviour of an individual axis (‘log’, ‘linear’) can be passed to the axis on initialization.
-
dim
¶ Dimension (number of axes)
Methods Documentation
-
evaluate
(self, method=None, **kwargs)[source]¶ Evaluate NDData Array
This function provides a uniform interface to several interpolators. The evaluation nodes are given as
kwargs
.Currently available:
RegularGridInterpolator
, methods: linear, nearest- Parameters
- methodstr {‘linear’, ‘nearest’}, optional
Interpolation method
- kwargsdict
Keys are the axis names, Values the evaluation points
- Returns
- array
Quantity
Interpolated values, axis order is the same as for the NDData array
- array