Module functions to subtract background from a source dataset, or to undo subtraction.
Integer_Type set_subtract([Integer_Type])
Integer_Type set_unsubtract([Integer_Type])
Success/Error Return Values: 1/0
Arguments:
(1) Dataset number (default 1)
These functions return 1 if successful, and 0 if the (un)subtraction
cannot be done (because, e.g., background already have been subtracted
before a call to set_subtract).
See the related Sherpa commands
SUBTRACT and
UNSUBTRACT for more information.
Subtract the background from dataset 1; then add it back in:
sherpa> DATA example.pha
The inferred file type is PHA. If this is not what you want, please
specify the type explicitly in the data command.
WARNING: using systematic errors specified in the PHA file.
RMF is being input from:
<directory_path>/example2.rmf
ARF is being input from:
<directory_path>/example2.arf
Background data are being input from:
<directory_path>/example2_bkg.pha
sherpa> is_subtracted
0
sherpa> set_subtract
1
sherpa> is_subtracted(1)
1
sherpa> set_unsubtract()
1
sherpa> is_subtracted(1)
0
The 0 returned from the first call indicates that no, dataset 1 is
not yet background subtracted. (Unlike XSPEC,
Sherpa does not automatically subtract background
data upon input.)
The 1 returned from the third call, issued after the call to the
set_subtract function, indicates that yes, dataset 1 is
now background-subtracted. Similarly, the 0 returned from the last
call to is_subtracted indicates that the call to
set_unsubtract was successful.
- chandra
-
guide
- sherpa
-
autoest,
back,
berrors,
bsyserrors,
coord,
data,
dataspace,
fakeit,
feffile,
group,
guess,
is_subtracted,
load,
load_arf,
load_ascii,
load_back_from,
load_backset,
load_dataset,
load_fitsbin,
load_image,
load_inst,
load_inst_from,
load_pha,
load_pha2,
load_rmf,
read,
set_analysis,
set_axes,
set_backscale,
set_coord,
set_data,
set_exptime,
set_weights,
setback,
setdata,
subtract,
ungroup,
unsubtract,
use
|