    Exclude a spatial region from all data sets.

ignore2d(val=None)
val - str, optional

Select a spatial region to exclude in the fit. The filter is applied to all data sets.

Exclude points that fall within the two regions:

>>> ignore2d("ellipse(200,300,40,30,-34)") dataset 1: Field() -> Field()&!Ellipse(200,300,40,30,-34) >>> ignore2d("box(40,100,30,40)") dataset 1: Field()&!Ellipse(200,300,40,30,-34) -> Field()&!Ellipse(200,300,40,30,-34)&!Box(40,100,30,40)

Use a region file called 'reg.fits', by using either:

>>> set_coord("physical") >>> ignore2d("reg.fits") dataset 1: Field() -> Field()&!Ellipse(3144.52,4518.81,25.2979,19.1119,42.9872)

or

>>> set_coord("physical") >>> ignore2d("region(reg.fits)") dataset 1: Field() -> Field()&!Ellipse(3144.52,4518.81,25.2979,19.1119,42.9872)

Exclude all points and hide the screen output:

>>> from sherpa.utils.logging import SherpaVerbosity >>> with SherpaVerbosity("WARN"): ... ignore2d() ...

PARAMETERS

The parameter for this function is:

Parameter
Definition
val
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.

Notes

The region syntax is described in the `notice2d` function.

Changes in CIAO

The change in the filter is now reported for each dataset.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023