NAME

Spibkg_init -- Initialize input database for the XSPEC "spibkg" models that are used in the spectral deconvolution of INTEGRAL/SPI data


USAGE

        spibkg_init inarf1 inarf2 inarf3 w_arf1 w_arf2 w_arf3 inpha
          use_spiback spibackfil outfil  


DESCRIPTION

The SPIBKG_INIT utility is used to prepare INTEGRAL/SPI data for analysis with the XSPEC (version 12 or higher) spectral analysis package. It should be run for each individual SPI observation/data analysis session. SPIBKG_INIT constructs a database (FITS file) of background spectral templates, and scaling parameters, which are customized for a given observation and analysis. These data are then read in to XSPEC upon the initialization of one of the "spibkg" models. In the few hundred keV to ~10 MeV spectral domain, the instrumental background is highly complex - at least several hundred strong, narrow and often time-variabe lines are present. It is variable on a wide range of timescales as well as from detector to detector, and it is the predominant component of the recorded counts for an observation; typically less than ~1% are due to the astrophysical source of interest. The usual procedures used to subtract the background in the few-to-tens of keV Xray domain would be inadequate and lead to large systematic errors and negative fluxes. Nor is an empirical subtraction such as is done with "chopping" mode instruments such as CGRO/OSSE or RXTE/HEXTE are not applicable for coded-mask, high-resolution spectrometer such as INTEGRAL/SPI. Thus to perform a true, full spectral deconvolution one must simultaneously solve for source plus background components. The SPIBKG_INIT utility uses observation-specific information such as the degree of individual detector shadowing for the brightest sources within the field ov view, the recorded count rates, the selected energy binning and net exposure time per instrument pointing.

In addition, a related utility, SPIBACK (which is part of the INTEGRAL Offline Science Analysis (OSA) software package assembles information from other sources, such as the spacecraft scientific house-keeping database, which can be read into SPIBKG_INIT (see <http://isdc.unige.ch/index.cgi?Soft+download> For obtaining and installing INTEGRAL OSA). In principle, this can then be used to derive a more accurate model of the instrumental background. SPIBKG_INIT produces an output FITS file, which is referenced by XSPEC as an environment variable, SPIBKG_INP_DAT, or directly as a file named "spibkg_inp_dat.fits" that must reside in the XSPEC run directory. It is recommended that this option be used if there are more than ~3 sources of comparable brightness to be modeled.Note, at least on source ARF must be entered, EVEN if the SPIBACK option is selected.


PARAMETERS

inarf1 [string]
Component-1 arf file (generated by SPIARF) for a source of interest. This file represents the photo-peak effective area as a function of energy, detector, and dither pointing for a given source position. It contains information on the relative shadowing with can be used in initializing the background model.

inarf2 [string]

inarf3 [string]
Similar to inarf1, for additional sources in the observation field of view. Note that more than 3 sources can be included in the fit, but for the purposes of initializing the background model, a maximum of three (which are anticipated to be the brightest) is recommended.

w_arf1, w_arf2, w_arf3 [float]
Relative weighting factors to be applied to the input arfs (sources). For example, if there 2 sources are anticipated, and one (for which arf1 hascomputed) is about twice as bright as the other set w_arf1=2.0, w_arf2=1.0 and w_arf3=0.0. If only one source is to be considered (which will often be the case, for example, in high-latitude fields), then set w_arf1=1.0, w_arf2=0 and w_arf3=0.

inpha [string]
Name of the type-II pha file (created by "SPIHIST") containign the detector-count spectral data that is being analyzed.

use_spiback [string]
Yes/No flag. If use_spiback="Y", the information from the "background model" (FITS) file produced by the INTEGRAL SPIBACK program will be used in initializing the background model database. SPIBACK extracts information from the observation science and house-keeping data to derive temporal and detector-to-detector variations in the observation. However, SPIBACK is a complicated program with a large number of options, some of which are not fully developed at present.

outfil [string]
Name of output FITS file. This should either be named "spibkg_inp_dat.fits", and placed in your XSPEC run directory, OR, named anything you like, but referenced by an environment variable called SPIBKG_INP_DAT before you run XSPEC.


EXAMPLES

1) An observation of the Crab nebula, which is to a good approximation an isolated point source. One component-1 arf file is used. The weighting factor for that arf is set to 1.0, but this is not necessary in this simple case. The PHA-II data file upon which the analysis is based is specified, and the option to use the results from SPIBACK is set to no. The SPIBACK output file nema is specified, but this is superfluous since we chose not to use it.

     inarf1,s,ql,"/mydir/rev0044_crab_cmp1.arf.fits",,,"Input ARF file for source 1:"
     inarf2,s,ql,"NONE",,,"Input ARF file for source 2:"
     inarf3,s,ql,"NONE",,,"Input ARF file for source 3:"
     inarf4,s,ql,"NONE",,,"Input ARF file for source 4:"
     w_arf1,s,ql,1.0,,,"Relative weighting factor for source 1:"
     w_arf2,s,ql,0.0,,,"Relative weighting factor for source 2:"
     w_arf3,s,ql,0.0,,,"Relative weighting factor for source 3:"
     w_arf4,s,ql,0.0,,,"Relative weighting factor for source 4:"
     inpha,s,ql,"/mydir/rev0044.pha.fits",,,"Input PHA file:"
     use_spiback,s,ql,"N",,,"use information from SPIBACK to estimate background? (Y/N):"
     spibackfil,s,ql,"/mydir/spi/back_model.fits",,,"SPIBACK output file (or "NONE"):"
     outfil,s,ql,"spibkg_inp_dat.fits",,,"Output FITS file:"

2) An observation of the Cygnus region, consisting a 19-detector, 5x5 dithering strategy has been analyzed, leading to the type-II pha data file "rev0022_cygnus.pha.fits". The goal is to derive a spectrum for Cygnus X-1. The second brightest continuum, point gamma-ray source in the observation field-of-view is Cygnus X-3, which we assume is roughly 15% as bright as Cygnus X-1. Note that other weaker sources, such as Cyg X-2 or EXO 2030+375 may still be analyzed using this initial background model, even though they are not considered in the "inarf" list. A sample parameter file follows:

     inarf1,s,ql,"/mydir/rev0022_cygx1_cmp1.arf.fits",,,"Input ARF file for source 1:"
     inarf2,s,ql,"/mydir/rev0022_cygx3_cmp1.arf.fits",,,"Input ARF file for source 2:"
     inarf3,s,ql,"NONE",,,"Input ARF file for source 3:"
     inarf4,s,ql,"NONE",,,"Input ARF file for source 4:"
     w_arf1,s,ql,1.0,,,"Relative weighting factor for source 1:"
     w_arf2,s,ql,0.15,,,"Relative weighting factor for source 2:"
     w_arf3,s,ql,0.0,,,"Relative weighting factor for source 3:"
     w_arf4,s,ql,0.0,,,"Relative weighting factor for source 4:"
     inpha,s,ql,"/mydir/rev0022_cygnus_region.pha.fits",,,"Input PHA file:"
     use_spiback,s,ql,"N",,,"use information from SPIBACK to estimate background? (Y/N):"
     spibackfil,s,ql,"/mydir/spi/back_model.fits",,,"SPIBACK output file (or "NONE"):"
     outfil,s,ql,"spibkg_inp_dat.fits",,,"Output FITS file:"


FILES NEEDED

All of the input files are produced by the INTEGRAL OSA package: type-II PHA spectral data file, associated ARF ancilliary response matrix files, and (optionally) the background model file produced by SPIBACK.


BUGS


SEE ALSO

Related utilities from the INTEGRAL (OSA) suite: SPIHIST, SPIRMF, SPIARF, SPIBACK, SPIbkgSubtrct.

CATEGORY

Apr05 ftools.integral