| AHELP for CIAO 4.5 Sherpa v1 | notice_id |
Context: filtering |
Synopsis
Apply an include filter to 1D data by dataset id
Syntax
notice_id( ids, [lo,hi,bkg_id] ) notice_id( ids, expr, bkg_id )
Description
The notice_id command specifies the portion of 1D 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 notice command ("ahelp notice").
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 notice an intersection of filters, e.g. "0.1:5, 6:7". Range filtering allows ":#" and "#:", which includes 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 no limits 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. It is also possible to specify just a lower limit or just an upper limit; the unspecified value will remain at the data minimum or maximum.
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 include filter to 2D data, use the notice2d command ("ahelp notice2d") or the notice2d_id command ("ahelp notice2d_id").
Example 1
sherpa> notice_id(1, 5000,7000, bkg_id=2)
Ignore all data points below channel 5000 and above 7000 in the second backround data set associated with source data set 1.
Example 2
sherpa> notice_id([1,2])
The command is called without any limits defined, so all data points in datasets 1 and 2 are included.
Example 3
sherpa> notice_id("src", 1.0, 6.0)Include only data in the 1.0-6.0 keV range in the dataset labeled "src".
Example 4
sherpa> notice_id(2, "0.1:5, 6:7")
Notice the bins in dataset 2 between 0.1 and 5 keV and between 6 and 7 keV.
Example 5
sherpa> notice_id(2, 200,) sherpa> notice_id(2, 200, None)
These commands are two equivalent ways of applying an open-ended notice_id filter to data set 2, in channel space. The lower limit of the filter is set at channel 200, but the upper limit is undefined so that all data above channel 200 is included in the analysis.
Example 6
sherpa> notice_id([2,4], , 8.0) sherpa> notice_id([2,4], None, 8.0)
These commands are two equivalent ways of applying an open-ended notice_id filter to data sets 2 and 4 in energy space. The lower limit of the filter is undefined and the upper limit is set to 8.0 keV, so that all data below 8.0 keV is included in the analysis.
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, ignore_id, notice, notice2d, notice2d_id, show_filter

![[Sherpa Logo]](../imgs/sherpa_logo_navbar.gif)