Inputs the contents of one or more background data files.
sherpa> BACK [# [ID]] <filespec> [,[# [ID]] <filespec>,...]
where # specifies the number of the dataset to be associated with this
background data file (default dataset number is 1). The ID modifier is
used if and only if the Sherpa state object variable multiback is set
to 1, i.e., if more than one background dataset is to be associated
with a single source dataset. The ID modifier may be any unreserved
string (e.g., A, foo, etc.), i.e., a string that is not a parsable
command.
Alternative means of reading in background datasets involve using the
load functions of the Sherpa/S-Lang module
(e.g., load_bpha).
The help file for the READ command explains the <filespec>
definition and has a listing of allowed file types; see also the related
commands BACKGROUND, BACKERRORS, and SETBACK.
A few things to note:
-
If the source data are read in after the background data are read in,
the background data are deleted. Always read in the source data first!
-
To perform background subtraction in
Sherpa, the command SUBTRACT must be issued; this
is in contrast to XSPEC, which performs background
subtraction automatically.
-
Input source and background datasets do not need to be the same size
unless you wish to subtract the background. The
SUBTRACT command may only be used when the input source
and background datasets are the same size. (More specifically, for the
case of PHA datasets, the source and background datasets must have the
same size when ungrouped; if the input source dataset is grouped and
the input background dataset is ungrouped, Sherpa will
automatically group the background data before subtraction.)
-
In CIAO 3.1 the definition of INSTRUMENT BACK is required for both
filtering and fitting of PHA data if either background file or background
models have been defined. INSTRUMENT BACK is set automatically
when the PHA source file is input to Sherpa, however it
is deleted if the NEW background file is input for a given data set,
thus the new INSTRUMENT BACK has to defined on the command line
before filtering and fitting the data with the new background file.
This command is able to take any Data Model virtual file
specification (see "ahelp dmsyntax"). If you can do
unix% dmcopy "infile.fits[spec 1][spec 2]" outfile.fits
you can also do
sherpa> back "infile.fits[spec 1][spec 2]"
This is especially useful when working with very large files. For
example:
sherpa> back "evt.fits[bin sky=4][opt mem=100]"
bins the event file by a factor of four and allocates additional
memory. A similar command (omitting the binning factor) can be used
to read in an image.
Input 2-D FITS image data and background files; subtract and
unsubtract background data:
sherpa> DATA 3 example_img.fits FITS
sherpa> BACK 3 example_img_bkg.fits FITS
sherpa> SUBTRACT 3
sherpa> UNSUBTRACT 3
The first command, DATA 3
example_img.fits FITS, reads the FITS image example_img.fits,
as dataset number 3. The second command reads the background FITS
image for this dataset. The third command, SUBTRACT 3, performs the background
subtraction for dataset number 3. The final command, UNSUBTRACT 3, restores dataset number 3
to its original unsubtracted state.
Input IMH image data and background files, then subtract the background:
sherpa> DATA example.imh
sherpa> BACK example_bkg.imh
sherpa> SUBTRACT
The first two commands read in the image and background image,
respectively, for dataset 1. SUBTRACT subtracts the background from the data.
- chandra
-
guide
- sherpa
-
autoest,
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_subtract,
set_weights,
setback,
setdata,
subtract,
ungroup,
unsubtract,
use
|