Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/ignore2d.html
AHELP for CIAO 4.16 Sherpa

ignore2d

Context: filtering

Synopsis

Exclude a spatial region from all data sets.

Syntax

ignore2d(val=None)

val - str, optional

Description

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


Examples

Example 1

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)

Example 2

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)

Example 3

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

Changed in CIAO 4.15

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


Bugs

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

See Also

data
group, group_adapt, group_adapt_snr, group_bins, group_counts, group_snr, group_width, set_coord
filtering
get_filter, ignore, ignore2d_id, ignore2d_image, ignore_bad, ignore_id, notice, notice2d, notice2d_id, notice2d_image, notice_id, show_filter