Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/sherpa/ahelp/ignore_id.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.9 Sherpa v1

ignore_id

Context: filtering

Synopsis

Apply an exclude filter to 1-D data by data set ID

Syntax

ignore_id( ids, [lo,hi,bkg_id] )
ignore_id( ids, expr, bkg_id )

Description

Specifies a portion of data to be excluded from the 1-D data set(s) supplied by ID. To operate on all data sets without having to list the IDs, use the ignore command ("ahelp ignore").

When a filter is applied to a source data set, it is also automatically applied to all associated background data sets. A different filter for a background can still be imposed afterward, using the bkg_id parameter to filter just the background.

  • ids - a list of ids of the data sets to filter; default=None
  • bkg_id - background data set ID, to apply a separate filter to associated background data (when left blank, the background will be filtered automatically according to the specified source filter; see 'id' description above)
  • lo: lower bound of the filter; default=None
  • hi: upper bound of the filter; default=None
  • expr: a filter expression to ignore a combination of filters, e.g. "0.1:5, 6:7". Range filtering allows for an open-ended range of values, so that ":2" excludes data up to, or "2:" beginning at, the given value (2 here), respectively.

The units for the limits are determined by the "units" field of the data structure: channels, energy (keV), or wavelength (angstrom). The value can be obtained by using the get_analysis command ("ahelp get_analysis").

If the data is binned and the endpoint of the interval falls within a bin, the entire bin is included in the filter.

Two-dimensional Data Filtering

To apply an exclude filter to 2D data, use the ignore2d command ("ahelp ignore2d") or the ignore2d_id command ("ahelp ignore2d_id").

Example 1

sherpa> ignore_id()

When the function ignore_id is called with no arguments, the filter will ignore all data points on the grid of the default data set ID and its associated background.

Example 2

sherpa> ignore_id(2, 0.1, 6.0)

Supplying a filter interval in the units of the current analysis (see 'ahelp get_analysis') will apply the filter to all the specified data set IDs (and associated background data in this example). Here, all data points above the value 0.1 keV and below the 6.0 keV are excluded in data set "2".

Example 3

sherpa> ignore_id(1, None, 5500, bkg_id=2)

Ignore all data points below channel 5500 in the second background data set associated with source data set 1.

Example 4

sherpa> ignore_id(2, "0.1:5, 6:7")

Ignore the bins in dataset id=2 between 0.1 and 5 keV and between 6 and 7 keV.

Example 5

sherpa> ignore_id("bkg", 0.1, None)

All data points above the value 0.1 are excluded in the data set labeled "bkg".

Example 6

sherpa> ignore_id([2,4], ":6.0")

or the equivalent expression:

sherpa> ignore_id([2,4], None, 6.0)
sherpa> show_filter(2)
Data Set Filter: 2
6.0079-14.9431 Energy (keV)

All data points below the value 6.0 are ignored in data sets "2" and "4". Note that the both expressions are valid and result in the same energy range being ignored. show_filter(2) shows the energy range remaining for analysis of data set 2.

Bugs

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

See Also

data
group
filtering
get_filter, ignore, ignore2d, ignore2d_id, ignore_bad, notice, notice2d, notice2d_id, notice_id, show_filter

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.