NAME

xrttam -- Calculate corrections to the attitute file using parameters from the TAM device.

USAGE

xrttam hdfile outdir [parameter = ]

DESCRIPTION

'xrttam' calculates the corrections to the attitude file using parameters derived from the Telescope Alignment Monitor (TAM) device by running in sequence 'det2att' and 'attcombine'. The corrected attitute is applied to the XRT event data to transform the detector coordinates of the XRT instrument in sky position. After this correction the reconstructed XRT sky positions have an accuracy of few arcsecs.
The TAM device on-board Swift monitors the alignment between the XRT focal plane camera and the optical axis of the mirror system. The TAM system consists of a redundant pair of LEDs mounted near the XRT focal plane, an optical assembly, a mirror on the Star tracker subsystem and an optical camera which records two images, one directly reflected by the optical assembly, the other reflected by a mirror on the Star tracker subsystem.
The first image, the Primary TAM image, records the movement of the focal plane. The second image, the Star tracker image, is sensitive to both the Star tracker boresight and the XRT boresight, so that it is necessary to subtract the offset of the Primary image from the offset of the Star tracker image to isolate the contribution from the Star tracker boresight. Changes in the TAM centroid positions are related to distortions of the position of a photon on the CCD. To obtain the correct position of an event on the XRT and then in sky coordinates, the information obtained by the TAM device must be taken into account. The coordinates of the two image centroids on the TAM camera (included in the housekeeping data) are compared to the LED reference positions on the TAM (stored in the CALDB) in order to detect either distortions of the XRT structure or offsets induced by the Star tracker movements. The LEDs reference positions can be provided also by the user through the parameters 'tamrefx1', 'tamrefy1','tamrefx2', 'tamrefy2'.

'xrttam' translates the offsets of the TAM images into corrections to the detector coordinates on the XRT. These corrections are stored in a FITS file ('outtamfile') containing three columns with TIME, delta DETX and delta DETY information. The corrections to the detector coordinates are then transformed in corrections to the attitude, running the task 'det2att'. The 'det2att' output and the original attitude file are combined using the task 'attcombine' producing a corrected attitude file. The latter is applied to the event file when calculating sky position of the events (X and Y coordinates). The keyword 'XRTTAM' set to 'T' is added to the output corrected attitude file to prevent from applying the TAM correction more than once.

PARAMETERS

hdfile [file name]
Name of the input FITS Housekeeping Header Packets Fits File to be processed.

outdir [directory name]
Directory for the output files.

(tamfile = CALDB)
Name of the input TAM calibration file. If set to 'CALDB'(default), use a file from the Calibration Database.

outattfile [file name]
Name of the output TAM corrected attitude file. If set to 'DEFAULT', the standard naming convention is assumed for the filename.

attfile [file name]
Name of input attitude FITS file.

(teldef = CALDB)
Name of input teldef file. If set to 'CALDB'(default), use a file from the Calibration Database.

outtamfile [filename]
Name of the output FITS file containing the corrections to the XRT detector coordinates deduced by TAM images. If set to 'DEFAULT', the standard naming convention is assumed for the filename.

(tamrefx1 = -99)
X coordinate of the reference position of the Primary TAM image. If set to a negative number, use the values stored in the file specified via the 'tamfile' parameter.

(tamrefy1 = -99)
Y coordinate of the reference position of the Primary TAM image. If set to a negative number, use the values stored in the file specified via the 'tamfile' parameter.

(tamrefx2 = -99)
X coordinate of the reference position of the Secondary TAM image. If set to a negative number, use the values stored in the file specified via the 'tamfile' parameter.

(tamrefy2 = -99)
Y coordinate of the reference position of the Secondary TAM image. If set to a negative number, use the values stored in the file specified via the 'tamfile' parameter.

(alignfile = CALDB)
Name of Spacecraft Alignment calibration file or CALDB.

(interpolation = CONSTANT)
Attitude interpolation method (LINEAR|CONSTANT)

(clobber = no)
If set to 'yes', overwrites the output files with the same name if they exist.

(cleanup = yes)
If set to 'yes' temporary files are deleted.

(chatter = 3) [integer]
Verbosity Level from 0 to 5.

(history=yes) [boolean]
If set to 'yes', write HISTORY keywords in the output file.

EXAMPLES

  1. Compute the corrections to the detector coordinates deduced by TAM information, include them in a FITS file and generate a corrected attitude FITS file. Both FITS files are named using the Standard Naming convention.

    > xrttam hdfile=sw00073125003xhdtc.hk attfile=sw00073125003sat.fits.gz
    outattfile=DEFAULT outtamfile=DEFAULT outdir=./
    

BUGS

SEE ALSO

LAST MODIFIED

January 2005