NAME

cams2det - Calculate offsets and rotations in HXI coordinates using CAMS telemetry input

USAGE

cams2det infile1 infile2 outfile instrume

DESCRIPTION

The cams2det task calculates HXI coordinate system offsets and rotations due to the wobbling of the extended optical bench. The two input files are telemetry FITS files, one from CAMS1 and one from CAMS2. The output is a single FITS file with new columns containing the offsets in HXI RAW coordinates and the sine and cosine of the rotation angle. The output file can be converted into an attitude file by running the task det2att2 on the output file. The cams2det task must be run separately on each of the two HXI units, HXI1 and HXI2.

The task matches the input TIME columns of 'infile1' and 'infile2'. When a match is found, the task uses data from both CAMS units to derive the offsets and rotation angle. If no match is found within a given tolerance (fixed in the software to 1 ms), the offset for that row is calculated based on a single CAMS unit and the rotation angle is set equal to zero.

The following columns are written to the output offset file:

PARAMETERS

infile1 = cams1_data.fits [filename]
Name of the input CAMS1 telemetry FITS file containing the X and Y positions determined by the CAMS1 system.

infile2 = cams2_data.fits [filename]
Name of the input CAMS2 telemetry FITS file containing the X and Y positions determined by the CAMS2 system.

outfile = cams_det.fits [filename]
Name of the output offsets file containing the offsets and rotation angle in HXI RAW coordinates.

(cams1teldef = CALDB) [filename CALDB|file name]
Name of the CAMS1 teldef file. If the parameter is set to CALDB, the file is read from the calibration database.

(cams2teldef = CALDB) [filename CALDB|file name]
Name of the CAMS2 teldef file. If the parameter is set to CALDB, the file is read from the calibration database.

(hxiteldef = CALDB) [filename CALDB|file name]
Name of the HXI1 or HXI2 teldef file. If the parameter is set to CALDB, the file is read from the calibration database.

instrume [string HXI1|HXI2|1|2]
Name or identifier (1 or 2 for HXI1 or HXI2 respectively), of the HXI unit for which the offsets are to be derived.

(inext = CAMS_DATA) [string]
Name of data extension in 'infile1' and 'infile2'.

(outext = CAMS_OFFSETS) [string]
Name of the extension of the output file to which the offset data is written.

(flipsign = no) [boolean yes|no]
Flip the sign of the output offsets and angles. This parameter is used for debugging by setting 'flipsign=yes'.

(startsys = RAW) [string RAW|FOC]
Starting coordinate system.

(buffer = -1) [integer -1|0|N]
Rows to buffer (-1=auto, 0=none, N>0=numrows).

(clobber = no) [boolean yes|no]
Overwrites the existing output file if set to yes.

(chatter = 1) [integer 0|1|23]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string DEFAULT|NONE|file name]
Log file name. If set to DEFAULT, uses the name of the task and, if preceded by "!", overwrites the file if it exists. If set to NONE, no log file is created.

(debug = no) [boolean yes|no]
Diagnostic output is printed to the screen if set to yes.

(history = yes) [boolean yes|no]
Records tool parameters in HISTORY.

EXAMPLES

  1. Calculate the offsets from the CAMS unit for motions of the HXI1 instrument. The teldef files for the CAMS are found using a CalDB query. The teldef file for the HXI is specified on the command line.
  2.    cams2det infile1=CAMS1.fits infile2=CAMS2.fits outfile=HXI1_offsets.fits cams1teldef=CALDB cams2teldef=CALDB \
          hxiteldef=hxi1_teldef.fits instrume="HXI1 clobber=yes 
    

SEE ALSO

det2att2, cams2att

LAST MODIFIED

March 9, 2020