NAME

xrtmkarf -- Generates an  ARF file for an input PHA  file

USAGE

xrtmkarf outfile phafile expofile srcx srcy psfflag [parameter = < value >]

DESCRIPTION

'xrtmkarf' generates an OGIP-style Ancillary Response Function (ARF) file which is suitable for input into the spectral fitting program XSPEC. The ARF file contains the effective area of the telescope as a function of energy needed to perform spectral analysis. This is calculated taking into account mirror effective area, filter transmission, vignetting correction and, optionally, the PSF correction and (for PC and WT modes) an input exposure map.
'xrtmkarf' reads the energy grid from the input RMF file (parameter 'rmffile') and the on-axis effective area from the input ARF file (parameter 'inarffile'). If 'inarffile=NONE' the task calculates the on-axis effective area using the mirror effective area (parameter input 'mirfile') and the filter transmission (parameter input 'transfile') and makes a linear interpolation to adapt them to the RMF energy grid.
The effective area is then corrected for the vignetting function (always) and the PSF (optional) on the basis of the source position. The input files for the RMF, on-axis effective area, PSF and vignetting are, by default, read from the Calibration Database.
If parameter 'psfflag' is set to 'yes' the PSF correction is calculated for a point-like source taking into account the different geometry for the different operational mode of the telescope. The PSF correction is calculated for each energy (input from the RMF energy grid) as the ratio between the total fluence of the source and the fluence within the extraction region. This ratio is calculated by summing the PSF fraction contained in each sky pixel of the extraction region. If the parameter 'expofile' is different from 'NONE' the PSF fraction of each sky pixel of the extraction region is weighted by the corresponding value in the exposure map. If the exposure map has the vignetting correction already applied, accordingly 'xrtmkarf' does not apply the correction a second time.
The source position in sky coordinates (Photon Counting and Windowed Timing modes) or detector coordinates (PU and LR Photodiode mode) must be input via the parameters 'srcx' and 'srcy'. From the input spectrum (parameter 'phafile'), the extraction region is read from the WMAP extension. Only for the Photon Counting and Windowed Timing modes, xrtmkarf assumes the center of the extraction region to be the source position if the 'srcx' and 'srcy' parameters are set to zero or negative values.

The task can generate the ARF file also for extended sources, such as clusters of galaxies or supernova remnants, by setting the parameter 'extended' to 'yes'. For the extended source case, to follow the spatial variations of the detector properties, the extraction region file, read from the first extension of the input spectrum file, is divided in boxes of size chosen by the user (parameter 'boxsize'). For each subregion, an ARF is produced without including the point-like PSF correction. This set of ARF files are then combined using the 'addarf' FTOOL to produce the output ARF.

PARAMETERS

outfile [file name]
Name of the output ARF FITS file.
(rmffile = CALDB) [file name]
Name of the input RMF file.If set to 'CALDB' (default value), use the file in the Calibration Database, and the RMF is selected based on the information read from the spectral file
(mirfile = CALDB) [file name]
Name of the input Mirror on-axis effective area file.If set to 'CALDB' (default value), use the file in the Calibration Database. Used only if parameter 'inarffile' is NONE.
(transmfile = CALDB) [file name]
Name of the input Filter Transmission file. If set to 'CALDB' (default value), use the file in the Calibration Database. Used only if parameter 'inarffile' is NONE.
(inarffile = CALDB) [file name]
Name of the input on-axis Ancillary Response Function (ARF) file. If set to 'CALDB' (default value), use the file in the Calibration Database. If set to NONE the on-axis effective area is calculated using the parameters 'mirfile' and 'transmfile'.
expofile [file name]
Name of the input exposure file. If set to NONE the exposure of the extraction region is assumed to be constant.
(psffile = CALDB) [file name]
Name of the input PSF FITS file. If set to 'CALDB' (default value), use the file in the Calibration Database.
psfflag [boolean]
If set to 'yes', correct for the PSF for point-like sources.
(vigfile = CALDB) [file name]
Name of the input vignetting FITS file. If set to 'CALDB' (default value), use the file in the Calibration Database.
phafile [file name]
Name of the input PHA FITS file.
srcx [real]
Source coordinate in pixels. For PC and WT modes enter the pixel value corresponding to the X column [1-1000]. If srcx is zero or negative the task uses for these modes the WMAP in the primary header of the spectral file and assumes that the extraction region is centered on the source position. For the PU and LR photodiode modes enter the pixel value corresponding to the DETX column [1-600].
srcy [real]
Source coordinate in pixels. For PC and WT modes enter the pixel value corresponding to the Y column [1-1000]. If srcy is zero or negative the task uses for these modes the WMAP in the primary header of the spectral file and assumes that the extraction region is centered on the source position. For the PU and LR photodiode modes enter the pixel value corresponding to the DETY column [1-600].
(offaxis=-99) [real]
Source off-axis angle (arcmin). This parameter can be used only if the task is run with the option 'extended=no'. If set to a negative value, the off-axis angle is calculated internally by the task.
(extended=no) [boolean]
Extended source?(yes/no).
(boxsize=20) [integer]
Size in pixel for the subimage boxes (used if extended=yes).
(cleanup=yes) [boolean]
If 'cleanup'=yes the temporary file will be deleted.
(clobber=no) [boolean]
If set to 'yes', the task overwrites existing output file.
(history=yes) [boolean]
If set to 'yes', write HISTORY keywords in the output file.
(chatter = 2) [integer]
Verbosity Level from 0 to 5

EXAMPLES

  1. Produce the effective area file 'out.arf' (with PSF correction applied) using the spectrum 'sw00599287000xpcw3posr.pha' obtained filtering a Photon Counting mode event file on a spatial region centered on the source position. Corrections for the effective exposure of the extraction spatial region is also applied using the information stored in the input sky exposure map 'sw00599287000xpcw3po_ex.img'. Get all the calibration files needed to perform the computation from the Calibration Database.

    >  xrtmkarf  outfile=out.arf phafile=sw00599287000xpcw3posr.pha expofile=sw00599287000xpcw3po_ex.img
       srcx=-1 srcy=-1 psfflag=yes
    

BUGS

SEE ALSO

LAST MODIFIED

June 2015