NAME

calcbgdcor --> calculates the background spectra for a given source region with a given background region, away from source region.


USAGE:

        calcbgdcor srcfil bckfil arf_srcfil arf_bckfil particle_srcfil particle_bckfil
          rmffil expmapfil regfil_sou regfil_bck outfil

DESCRIPTION:

The usual method for correcting a spectrum, from an imaging detector, for background is to extract a spectrum from another part of the image and subtract that from the source spectrum. This assumes that the source region has the same background spectrum as the background region. However, in practice, instrument performance often varies across the face of the detector either due to mirror vignetting or changes in detector efficiency. To deal with this correction, the Xray and non-Xray part of background spectrum are separated. Then corrections for vignetting, detector efficiency and the area scaling are applied to the Xray component. This is when added to the non-Xray component of the source gives the background spectra for the source. This is done using the results of the tasks PCPARPHA, PCARF, PCEXPMAP, FIXREGION. Now, CALCBGDCOR collects all this information and returns the required corrected background spectra for the chosen source region. CALCBGDCOR supports regions POINT, CIRCLE, ELLIPSE, ANNULUS, and BOX. It does not support POLYGON.


WARNINGS ON USAGE

Before calling CALCBGDCOR, one has to run FIXREGION to convert the region files (source region and background region) to the appropriate coordinate system, i.e. the coordinate frame of the exposure map. So, after running PCEXPMAP one has to run FIXREGION, since CALCBGDCOR requires the corrected region files as inputs."

Also, before running this task user needs to set the environmental variable to CALDB. To do this, one needs to source the caldbinit.unix or caldbinit.vms or caldbinit_iraf.unix file depending on the system in use.


PARAMETERS:

srcfil [character string]
The name of the input FITS file containing the source spectrum.

bckfil [character string]
The name of the input FITS file containing the background spectrum.

arf_srcfil [character string]
The name of the ARF file for the source. This is the output from PCARF.

arf_bckfil [character string]
The name of the ARF file for the background. This is the output from PCARF.

particle_srcfil [character string]
The name of the file containing source particle spectrum. This is the output from PCPARPHA.

particle_bckfil [character string]
The name of the file containing background particle spectrum. This is the output from PCPARPHA.

rmffil [character string]
The name of the RMF file. By default, it is CALDB

expmapfil [character string]
The exposure map file. This is the output from PCEXPMAP.

regfil_sou [character string]
The converted region file for source

regfil_bck [character string]
The converted region file for background

outfil [character string]
The output file name to contain the background spectra

(chatter = 9) [integer]
Flag to set the chattyness at execution. Default value is set to 9, which gives the user the task version and few warnings. Lower/higher values produces quieter/verbose output on the screen.

(clobber = false) [boolean]
Flag specifying whether or not a pre-existing file with the same name as that requested as the output file from this task will be overwritten.


BUGS:

None known


SEE ALSO

help on PCPARPHA, PCARF, PCEXPMAP, FIXREGION


LOG OF SIGNIFICANT CHANGES:

v1.0.0 (Aug, 1996)
created

v1.3.0 (Aug, 1999)
Added POINT, ELLIPSE, and ANNULUS to supported regions


PRIMARY AUTHOR:

     Banashree Mitra Seifert
     HEASARC, NASA/GSFC
     http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp

CATEGORY

Aug1996 ftools.rosat