NAME

xmminstback - Construct the MOS particle background.

USAGE

xmminstback sas="YES" sasccf sasodf det obsfile fwcdir xmmdir regdef limarea backfile

xmminstback sas="NO" det xmmdir limarea backfile

DESCRIPTION

This program construct the MOS particle background from observed spectrum, FWC data and a corner data database from public XMM observations. The program use child processes to run XMM SAS commands to extract relative files and then use those files as inputs to calculate background spectrum. Before running this program, make sure XMM SAS was properly setup.

PARAMETERS

sas [boolean]
The boolean parameter specify whether need to select data through XMM SAS. The default value is Yes. If No is chosen, it assume the following files already exist in your current directory:
	mos1-1ff.pi  mos1-3fc.pi  mos1-4ff.pi  mos1-5oc.pi  mos1-7fc.pi
	mos1-2fc.pi  mos1-3ff.pi  mos1-4oc.pi  mos1-6fc.pi  mos1-7ff.pi	 mos1-obj.pi
	mos1-2ff.pi  mos1-3oc.pi  mos1-5fc.pi  mos1-6ff.pi  mos1-7oc.pi	 mos1.rmf
	mos1-2oc.pi  mos1-4fc.pi  mos1-5ff.pi  mos1-6oc.pi  mos1.arf
sasccf= "-" [SAS Environment variable SAS_CCF]
Update SAS enviroment variable SAS_CCF with sasccf. if sasccf is "-" , SAS_CCF is not changed.
sasodf="-" [SAS Environment variable SAS_ODF]
Update SAS enviroment variable SAS_ODF with sasodf. if sasodf is "-" , SAS_ODF is not changed.
det [Detector name]
The valid detector name is either mos1 or mos2.

obsfile [Name of observation file]
Clean observation file - meaning remove time intervals with flares and the standard patterns. Do not filter on FLAG==0, as that will get rid of the corner data that you will need for the background calculation.

fwcdir [FWC directory]
a directory of filterwheel closed (FWC) data:
	mos1-1.fits  mos1-3.fits  mos1-5.fits  mos1-7.fits  mos2-2.fits  mos2-4.fits  mos2-6.fits
	mos1-2.fits  mos1-4.fits  mos1-6.fits  mos2-1.fits  mos2-3.fits  mos2-5.fits  mos2-7.fits

xmmdir [XMM qpb database directory]

limarea [Value of backscale below which chips are eliminated]

bkgfile [Name of output object background spectrum file]

(clobber = NO) [boolean]
If outfile already exists, then setting 'clobber = yes' will cause it to be overwritten.

(chatter = 1) [integer, 0 - 5]
Controls the amount of informative text written to standard output. Setting chatter = 5 will produce detailed diagnostic output, otherwise this task normally does not write any output.

(history = NO) [boolean]
If history = YES, then a set of HISTORY keywords will be written to the header of the sorted HDU to record the value of all the ftsort task parameters that were used to produce the output file.

EXAMPLES

Note that when commands are issued on the Unix command line, strings containing special characters such as '[' or ']' must be enclosed in single or double quotes.

1. Construct background spetrum from mos1-clean.fits, XMM database and region defination.

      xmminstback YES - - mos1 mos1-clean.fits  /Home/lhea3/xmm_back/fwc /Home/lhea3/xmm_back/qpb/ 
                 CIRCLE(0,0,17000,DETX,DETY) 300000 bkgfile 
      xmminstback NO mos1 /Home/lhea3/xmm_back/qpb/ 300000 bkgfile

SEE ALSO

mos-ext, platee.pro, perl and IDL program created by K.D.Kuntz.

LAST MODIFIED

Novemeber 2004