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:
- TIME [s]: derived from the TIME column present in the two input CAMS data files.
- DELTARAWX/DELTARAWY [pixels]: the component in the HXI RAW X/Y direction
of the offset required to correct for the wobble of the HXI extended optical
bench.
- COSANGLE/SINANGLE: the cosine/sine of the rotation angle required to
correct for the wobble of the HXI extended optical bench.
- X1/X2: the motion in
the X-direction in the local coordinate system of the CAMS1/CAMS2
unit. It is copied directly from the X column in the input file
'infile1/infile2'.
- Y1/Y2: motion
in the Y-direction in the local coordinate system of the CAMS1/CAMS2
unit. It is copied directly from the Y column in the input file
'infile1/infile2'.
- JUMPX1/X2: the difference between successive values of X1/X2.
- JUMPY1/Y2: the difference between successive values of Y1/Y2.
- QUALITY1/QUALITY2: copied directly from the QUALITY column of 'infile1/infile2'.
- XDISTANCE/YDISTANCE [mm]: the X/Y distance between the CAMS units,
(X2 - X1)/(Y2 - Y1). This is
calculated as an intermediate step in deriving the offset and rotation angle.
- DELTASATX/DELTASATY [mm]: the offset equivalent to DELTARAWX/DELTASATY, but
measured in the
satellite (SAT) coordinate system.
- BAD_UNITS: indicates which CAMS unit has valid data. If this equals to 0, both
CAMS
units have valid data, if it equals to 1, only CAMS2 has valid data, and if it
equals 2, only CAMS1 has valid data.
- CALC_QUALITY: generated internally to the code and is used to indicate one or
more of the following situations.
- CALC_QUALITY = 0: successful calculation of offsets
and rotation (twist) angle.
- CALC_QUALITY = 1: the rotation angle is not calculated because one CAMS unit
does not have good data.
- CALC_QUALITY = 2: tiny twist angle fixed to cos(twist)=+/-1, sin(twist)=0
due to problem in the calculation of the twist angle.
- CALC_QUALITY = 4: no calculation of offsets or twist angle possible.
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
- 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.
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