    Set the filter array of a data set.

set_filter(id, val=None, bkg_id=None, ignore=False)
id - int or str, optional
val - array
bkg_id - int or str, optional
ignore - bool, optional

Ignore those bins with a value less 20.

>>> d = get_dep() >>> set_filter(d >= 20)

PARAMETERS

The parameters for this function are:

Parameter
Definition
id
The data set to use. If not given then the default identifier is used, as returned by `get_default_id` .
val
The array of filter values ( 0 or 1 ). The size should match the array returned by `get_dep` .
bkg_id
Set to identify which background component to set. The default value ( none ) means that this is for the source component of the data set.
ignore
If False (the default) then include bins with a non-zero filter value, otherwise exclude these bins.

Notes

The function does not follow the normal Python standards for parameter use, since it is designed for easy interactive use. When called with a single un-named argument, it is taken to be the `val` parameter. If given two un-named arguments, then they are interpreted as the `id` and `val` parameters, respectively.

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

December 2023