Last modified: December 2013

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.11 Sherpa v1


Context: filtering


Apply an include filter to 2D data by dataset id


notice2d_id( ids, [val] )


The notice2d_id command specifies the region of 2D data to be included in the analysis. The filter is applied to the specified dataset ids; to operate on all datasets without having to list the ids, use the notice2d command ("ahelp notice2d").

The filter must be defined in the same coordinate system as the "coord" field of the data structure, which is returned by the get_coord command ("ahelp get_coord"). For information on the CIAO region filtering syntax, refer to "ahelp dmregions".

If the region definition on the Sherpa command line contains an arcsec or arcmin symbol, it must be escaped: \" or \' . The symbols do not need to be escaped if they are in a region file.

If no filter are supplied, all data points in the specified datasets are included. Noticing the entire set is a method of clearing any filters that have been applied.

One-dimensional Data Filtering

To apply an include filter to 1D data, use the notice command ("ahelp notice") or the notice_id command ("ahelp notice_id").


Example 1

sherpa> notice2d_id([1,2])

The command is called without any filter, so all data points in datasets 1 and 2 are included.

Example 2

sherpa> notice2d_id("src", "circle(275,275,50)")

A circular region defined in logical (image) coordinates is used to filter the dataset "src".

Example 3

sherpa> notice2d_id(2,

Filter dataset 2 with a complex region (a rectangular plus a circle) in physical coordinates.

Example 4

sherpa> notice2d_id(([2,4], "/data/src.reg")

Filter datasets 2 and 4 with the region stored in /data/src.reg. In this case, it is a circular region defined in WCS decimal coordinates:

sherpa> !cat /data/src.reg
# Region file format: DS9 version 4.0
# Filename:

Example 5

sherpa> notice2d_id(1, "circle(18:33:33.468,-10:34:08.66,42.6351\")")
sherpa> notice2d_id(1, "wcs.reg")

These commands are two equivalent ways of filtering dataset 1 with a region defined in WCS sexagesimal coordinates. The region file contains:

sherpa> !cat ~/src_wcs.reg

Note that the arcsec symbol must be escaped on the Sherpa command line (\"), but does not need to be escaped when the region is given in a file.


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

See Also

get_filter, ignore, ignore2d, ignore2d_id, ignore_bad, ignore_id, notice, notice2d, notice_id, show_filter