|AHELP for CIAO 4.5 Sherpa v1||
Apply an exclude filter to 1-D data by data set ID
ignore_id( ids, [lo,hi,bkg_id] ) ignore_id( ids, expr, bkg_id )
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 an intersection of filters, e.g. "0.1:5, 6:7". Range filtering allows ":#" and "#:", which excludes an open-ended range of data up to or beginning at the given value (#), 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
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.
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".
sherpa> ignore_id(1, None, 5500, bkg_id=2)
Ignore all data points below channel 5500 in the second backround data set associated with source data set 1.
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.
sherpa> ignore_id("bkg", 0.1, None)
All data points above the value 0.1 are excluded in the data set labeled "bkg".
sherpa> ignore_id([2,4], None, 6.0)
All data points below the value 6.0 are ignored in data sets "2" and "4".
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.