NAME

det2att2 - Converts detector coordinate offsets and rotations to attitude quaternions

USAGE

det2att2 infile outfile teldeffile startsys

DESCRIPTION

'det2att2' calculates the spacecraft rotation quaternions corresponding to offsets in detector coordinates. 'det2att2' can also incorporate time-dependent rotations of the detector coordinate system relative to the sky coordinate system. This option requires that the input file has columns for the sine and cosine of the rotation angle; otherwise the rotation angle is assumed to be zero.

'det2att2' is mission-independent and allows the selection of the origin system of the transformation using the parameter 'startsys'. The quaternion qdelta for an offset (dx, dy) is such that with a mapping of a detector position p = (px, py) to sky coordinates using an attitude q0, yield identical results when applying qdelta * q0 to p as applying q0 to (p - dx, p - dy).

PARAMETERS

infile [filename]
Name of the input offset file.

outfile [string]
Name of the output attitude file.

(teldeffile = CALDB) [string]
Name of the TelDef file. If the parameter is set to CALDB, the file is read from the calibration database.

startsys = SKY_FROM [string]
Name of the starting coordinate system. This must be either one of the coordinate systems defined in the file specified with the 'teldeffile' parameter or the special value 'SKY_FROM' (the default). With TelDef files format versions older than 0.2 and a parameter 'startsys' set to 'SKY_FROM', the originating coordinate system is read from the SKY_FROM keyword in the 'teldeffile.'

(deltaxcol = DELTADETX) [string]
Column name for the offset in the detector X coordinate.

(deltaycol = DELTADETY) [string]
Column name for the offset in the detector Y coordinate.

(sincol = SINANGLE) [string]
Column name for the sine of the rotation angle of the detector coordinates.

(coscol = COSANGLE) [string]
Column name for the cosine of the rotation angle of the detector coordinates.

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

(chatter = 1) [integer]
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]
Log filename. If set to DEFAULT uses the name of the task and, if preceded by '!', overwrite the file if it exists. If set to NONE no log file is created.

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

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

(mode = ql) [string]
Mode to query the parameter file. Acceptable values include: "ql (query and learn/remember), "hl" (hidden and learn/remember), "q" (query but don't remember), "h" (hidden).

EXAMPLES

1. Convert an offset file derived from the Hitomi CAMS into a delta-attitude quaternion. The input file is the output of 'cams2det.' The TelDef file is that for HXI1, which is the instrument for which the offsets were derived.

det2att2 infile="CAMS_offsets.fits" outfile="delta_attitude.att" \
teldeffile="ah_hxi1.teldef" startsys=RAW deltaxcol="DELTARAWX" \
deltaycol="DELTARAWY" clobber=yes

2. Convert an offset file derived from the Swift TAM into a delta-attitude quaternion. The TelDef file is that for Swift XRT. The 'deltaxcol' and 'deltaycol' parameters can be the default values. The 'sincol' and 'coscol' parameters are ignored.

det2att2 infile="TAM_offsets.fits" outfile="delta_attitude.att" \
teldeffile="sw_xrt.teldef" startsys=SKY_FROM clobber=yes

SEE ALSO

det2att cams2det cams2att

LAST MODIFIED

February 2016