notice2d_id

sherpa.astro.ui.notice2d_id(ids, val=None)

Include a spatial region of a data set.

Select a spatial region to include in the fit. The filter is applied to the given data set, or sets.

Parameters:
  • ids (int or str, or array of int or str) – The data set, or sets, to use.
  • val (str, optional) – A region specification as a string or the name of a file containing a region filter. The coordinates system of the filter is taken from the coordinate setting of the data sets (set_coord). If None, then all points are included.

See also

ignore2d()
Exclude a spatial region from all data sets.
ignore2d_id()
Exclude a spatial region from a data set.
ignore2d_image()
Select the region to exclude from the image viewer.
notice2d()
Include a spatial region of all data sets.
notice2d_image()
Select the region to include from the image viewer.

Notes

The region syntax is described in the notice2d function.

Examples

Select all the pixels in the default data set:

>>> notice2d_id(1)

Select all the pixels in data sets ‘i1’ and ‘i2’:

>>> notice2d_id(['i1', 'i2'])

Apply the filter to the ‘img’ data set:

>>> notice2d_id('img', 'annulus(4324.2,3982.2,40.2,104.3)')

Use the regions in the file srcs.reg for data set 1:

>>> notice2d_id(1, 'srcs.reg')

or

>>> notice2d_id(1, 'region(srcs.reg)')