Synopsis
Exclude data from the fit for a data set.
Syntax
ignore_id(ids, lo=None, hi=None, **kwargs) ids - int or str, or array of int or str lo - number or str, optional hi - number, optional bkg_id - int or str, optional
Description
Select one or more ranges of data to exclude by filtering on the independent axis value. The filter is applied to the given data set, or sets.
Examples
Example 1
Ignore all data points with an X value (the independent axis) between 12 and 18 for data set 1:
>>> ignore_id(1, 12, 18)
Example 2
Ignore the range up to 0.5 and 7 and above, for data sets 1, 2, and 3:
>>> ignore_id([1,2,3], None, 0.5) >>> ignore_id([1,2,3], 7, None)
Example 3
Apply the same filter as the previous example, but to data sets "core" and "jet":
>>> ignore_id(["core","jet"], ":0.5,7:")
PARAMETERS
The parameters for this function are:
Parameter | Definition |
---|---|
ids | The data set, or sets, to use. |
lo | The lower bound of the filter (when a number) or a string expression listing ranges in the form a:b , with multiple ranges allowed, where the ranges are separated by a , . The term :b means exclude everything up to, and including b , and a: means exclude everything that is higher than, or equal to, a . |
hi | The upper bound of the filter when lo is not a string. |
bkg_id | The filter will be applied to the associated background component of the data set if bkg_id is set. Only PHA data sets support this option; if not given, then the filter is applied to all background components as well as the source data. |
Notes
The order of `ignore` and `notice` calls is important.
The units used depend on the analysis setting of the data set, if appropriate.
To filter a 2D data set by a shape use `ignore2d` .
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
- filtering
- get_filter, ignore, ignore2d, ignore2d_id, ignore_bad, notice, notice2d, notice2d_id, notice_id, show_filter