xrttdrss -- Operate on the XRT image and spectra messages from TDRSS.
USAGE
xrttdrss [parameter =]
DESCRIPTION
'xrttdrss' processes the XRT image and the spectra generated on-board
soon after a GRB is detected. These data are sent via TDRSS as messages
and distributed first via the GCN. Because of the real time nature
of the data, the messages can be processed individually or
simultaneously by properly setting the input file name parameters.
IMAGE: The XRT uses the Image mode when first looks at a new GRB and generates
a postage stamp image.
The array transmitted contains a subset of the field of view (51x51 pixel)
centered on the GRB position. The array is in RAW coordinates and each pixel
contains the charge values. During the first 6 months of the mission
the bias was not subtracted and the charge value in each pixel
corresponds to the total charge detected. The bias has been subtracted
afterwords. 'xrttdrss' derives sky coordinates and subtracts the bias
when necessary.
It transforms the array from RAW coordinates to detector coordinates
and adds the WCS keywords in the header to project the image in the sky.
Note that the image is rotated respect to the celestial north.
The bias is subtracted using a constant value. The bias value was
derived during pre-launch calibration activities and recorded in a
calibration file stored in CALDB.
In addition 'xrttdrss' calculates the total flux from the source and the
error circle on the source position and writes both values in keywords of
the image header. The source flux is obtained by summing all pixels
in the array (a region of ~ 4 arcmin) with values bias and gain corrected
above a threshold set through the parameter 'dnthr'. The flux in ergs/cm2/s is derived
using a standard conversion factor.
Total flux and conversion factor are written in the keywords
SRCFLUX and CONVFACT, respectively. The error circle on the position is derived
by adding in quadrature the contributions of different factors. These are recorded in
a calibration file included in CALDB. The resulting error circle is written in arcsec
in the image header keyword ERRCTRD.
SPECTRA: After the IMAGE mode, the XRT operates first in the Low Rate
Photodiode (LR) mode and after switches to the Windowed Timing (WT) mode.
Two separate spectra are calculated and sent down via TDRSS. The first is in LR, the second is either
in WT (default) or a cumulative spectrum where LR and WT data are summed together.
The LR data are taken on-board either with the bias already subtracted (default) or
the bias not subtracted (obsolete). 'xrttdrss' checks the bias and applies a constant value
if not subtracted on board. The bias subtracted in the spectrum on ground was
derived during pre-launch calibration activities and recorded in a
calibration file included in CALDB. For the second spectrum, 'xrttdrss' checks first
if the spectrum contains only WT data or the cumulative LR and WT data.
If the second spectrum contains only WT data no further process is necessary.
Instead if the spectrum is the sum of the WT and LR, 'xrttdrss' subtracts the first
original LR spectrum to the cumulative (WT and LR) spectrum and recalculates the proper
exposure for the subtracted spectrum.
Both spectra are in PHA (not in PI) with 1024 channel (rebinned by a factor of 4
compared to original PHA array) and they are not background subtracted.
Note: 'xrttdrss' can operate on the second spectrum only after the first was processed.
'xrttdrss' searches for a temporary file made during the processing of the first
spectrum (an actual copy of that spectrum) and if not found it gives an error.
PARAMETERS
imagefile [file name]
Name of the input TDRSS image file. Type 'NONE' to not process the image file.
spec1file [file name]
Name of the input TDRSS first spectrum file. Type 'NONE' to not process this spectrum file.
spec2file [file name]
Name of the input TDRSS second spectrum file. Type 'NONE' to not process this spectrum file.
(posfile = CALDB) [file name]
Name of the calibration file containing the different components that contribute to the
error on the position. If set to CALDB, the file is read from the calibration database.
(imbias = -1) [integer]
Bias value for the Image mode data.
If set to a negative number, xrttdrss uses the values
in the file input via the parameter 'imbiasfile'.
Note this is used only when the bias has not been subtracted on board.
(pdbias = -1) [integer]
Bias value for the Photodiode mode data.
If set to a negative number, xrttdrss uses the values
in the file input via the parameter 'pdbiasfile'.
(imbiasfile) [file name]
Name of the calibration file containing the bias value for the Image mode.
If set to CALDB, the file is read from the calibration database.
Note this is used only when the bias has not been subtracted on board.
(pdbiasfile = CALDB) [file name]
Name of the calibration file containing the bias value for the Photodiode mode.
If set to CALDB, the file is read from the calibration database.
(outimagefile) [file name]
Name of the output TDRSS image file. Default set to xrt_proc_image.fits
(outspec1file) [file name]
Name of the output for the first TDRSS spectrum file. Default set to xrt_proc_spec1.fits
(outspec2file) [file name]
Name of the output for the second TDRSS spectrum file. Default set to xrt_proc_spec2.fits
(tmpspec1file) [file name]
Name of the spectral temporary file (created when processing the first spectrum). Default
set to xrt_raw_spec1temp.fits.
(clobber=no) [boolean]
If 'clobber'=yes and outfile=filename, the file with the same name
will be overwritten if it exists.
(history=yes) [boolean]
If set to'yes', write parameter values and other information in HISTORY keywords.
(chatter = 3) [integer]
Chatter Level (min=0, max=5)
(dnthr = 9) [real]
DN threshold to calculate the total flux from the source in the postage
stamp image.
(convfact = 0) [real]
Conversion factor to flux in ergs/cm2/s. If set to zero (default) the keyword FLUXFACT of the postage
stamp image is used to compute the flux conversion factor.
(cleanup=yes) [boolean]
Clean all the temporary files.
EXAMPLES
Process only the image message using the default output