calc_model_sum2d

sherpa.astro.utils.calc_model_sum2d(data, model, reg=None)[source] [edit on github]

Sum up the fitted model for a 2D data set.

Parameters:
  • data (sherpa.astro.data.DataIMG instance) – The data object to use.

  • model – The source expression, which should not include the PSF model.

  • reg (str, optional) – The spatial filter to use. The default, None, is to use the whole data set.

Returns:

dsum – The sum of the model values, including any PSF convolution, that lie within the given region.

Return type:

number

See also

calc_data_sum2d

Sum up the data values of a 2D data set.

calc_model_sum

Sum up the fitted model over a pass band.

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 or notice2d - is ignored by this function.