calc_data_sum2d
- sherpa.astro.utils.calc_data_sum2d(data, reg=None)[source] [edit on github]
Sum up the data values of a 2D data set.
- Parameters:
data (sherpa.astro.data.DataIMG instance) – The data object to use.
reg (str, optional) – The spatial filter to use. The default,
None
, is to use the whole data set.
- Returns:
dsum – The sum of the data values that lie within the given region.
- Return type:
number
See also
calc_data_sum
Sum up the data values of a data set.
calc_model_sum2d
Sum up the fitted model for a 2D data set.
Notes
The coordinate system of the region filter is determined by the coordinate setting for the data set (e.g.
data.coord
).Any existing filter on the data set - e.g. as created by
ignore2d
ornotice2d
- is ignored by this function.