Last modified: December 2020

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/notice.html
Jump to: Description · Examples · PARAMETERS · Notes · Bugs · See Also


AHELP for CIAO 4.13 Sherpa v1

notice

Context: filtering

Synopsis

Include data in the fit.

Syntax

notice(lo=None, hi=None, **kwargs)

lo - number or str, optional
hi - number, optional
bkg_id - int or str, optional

Description

Select one or more ranges of data to include by filtering on the independent axis value. The filter is applied to all data sets.


Examples

Example 1

Since the `notice` call is applied to an un-filtered data set, the filter chooses only those points that lie within the range 12 <= X <= 18.

>>> load_arrays(1, [10, 15, 20, 30], [5, 10, 7, 13])
>>> notice(12, 28)
>>> get_dep(filter=True)
array([10,  7])

Example 2

As no limits are given, the whole data set is included:

>>> notice()
>>> get_dep(filter=True)
array([ 5, 10,  7, 13])

Example 3

The `ignore` call excludes the first two points, but the `notice` call adds back in the second point:

>>> ignore(None, 17)
>>> notice(12, 16)
>>> get_dep(filter=True)
array([10,  7, 13])

Example 4

Only include data points in the range 8<=X<=12 and 18<=X=22:

>>> ignore()
>>> notice("8:12, 18:22")
>>> get_dep(filter=True)
array([5, 7])

PARAMETERS

The parameters for this function are:

Parameter Definition
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 include everything up to, and including b , and a: means include 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, and the results are a union, rather than intersection, of the combination.

If `notice` is called on an un-filtered data set, then the ranges outside the noticed range are excluded: it can be thought of as if `ignore` had been used to remove all data points. If `notice` is called after a filter has been applied then the filter is applied to the existing data.

For binned data sets, the bin is included if the noticed range falls anywhere within the bin.

The units used depend on the analysis setting of the data set, if appropriate.

To filter a 2D data set by a shape use `notice2d` .


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, ignore_id, notice2d, notice2d_id, notice_id, show_filter