NAME

attconvert - converts attitude formats

USAGE

attconvert input inform

DESCRIPTION

'attconvert' is a mission-independent tool for converting attitude files from one format to another. It supports three formats: Quaternion [x, y, z, real], Z-Y-Z Euler angles and Pointing angles (Right Ascension, Declination, roll).
Note that the tool renormalizes any input values for input values in quaternion format and rescales input angles as necessary (value outside range)

'attconvert' works in two modes:

1. Single point mode: 'input' parameter is a list of components separated by a comma. The 'inform' parameter is used to specify the format of the input list. The output formats are written both to stdout and to the output component parameters (the hidden parameters: 'quatx', 'quaty', 'quatz', 'quatr', 'eulerphi', 'eulertheta', 'eulerpsi', 'outra', 'outdec' and 'outroll' for the three different formats supported).

2. FITS file mode: In this mode, the 'input' parameter is a FITS file containing the column(s) to be converted. The column(s) name(s) for both the input and the output file are specified with the 'incol' and 'outcol' parameters respectively. If not present, the columns are created in the outfile.

PARAMETERS

input [string]
Either a comma-delimited list of the input attitude components or
the attitude filename containing the columns to be converted.

inform = EULER [string]
Input attitude format. Allowed values are: QUAT, EULER or POINTING. The default is EULER.

(outfile='att_out.fits') [string]
Output file name. This parameter is needed and used only in FITS file mode.

(outform = EULER) [string]
Output attitude format(s) for FITS file mode. Allowed values are QUAT, EULER or POINTING or a list of these values. Use commas as separators in a list of more than one format. The order of the format names must match the order of the corresponding column names in the outcol parameter.

(outcol=QPARAM) [string]
Name of the output attitude column(s) used in FITS file mode. Use commas as separators in a list of more than one column. The order of the column names must match the order of the corresponding format names in the outform parameter.

(alignfile = "NONE") [string]
Name of the alignment calibration file. The alignment file specifies the rotation between the telescope and spacecraft axes and also specifies the roll convention. The roll may be extracted from the 3rd Euler angle "psi" by 'roll = ROLLSIGN * (psi - 90 + ROLL_OFF)'. If a file is not supplied and the parameter is either 'NONE' (Default) or 'STANDARD', the code uses an identity matrix as the rotation matrix and sets 'ROLL_OFF = 0'. If 'alignfile=NONE', 'ROLLSIGN = +1'. If 'alignfile=STANDARD', 'ROLLSIGN = -1'. This is the configuration for Hitomi, Swift, and Suzaku. If an alignment file is specified, the pointing angles correspond to the spacecraft z-axis pointing. If a TelDef file is specified as an alignment file, the pointing angles correspond to the instrument pointing. This type of file includes the roll definition and the alignment matrix components as standard keywords.

(attext = ATTITUDE) [string]
Name of the attitude extension of the attitude file, for FITS File Mode.

(incol = EULER) [string]
Name of the existing attitude column, for FITS File Mode.

(quatx = 0.0) [real]
Value of the output quaternion x-component, for Single Point Mode.

(quaty = 0.0) [real]
Value of the output quaternion y-component, for Single Point Mode.

(quatz = 0.0) [real]
Value of the output quaternion z-component, for Single Point Mode.

(quatr = 1.0) [real]
Value of the output quaternion real component, for Single Point Mode.

(eulerphi = 0.0) [real]
Value of the output first Euler angle (phi) in degrees, for Single Point Mode.

(eulertheta = 0.0) [real]
Value of the output second Euler angle (theta) in degrees, for Single Point Mode. When theta is 0 or 180 degrees, there are an infinite number of first and third Euler angle pairs that represent the same rotation. In these cases, the output Euler angles may be displayed in an alternative but equivalent representation.

(eulerpsi = 0.0) [real]
Value of the output third Euler angle (psi) in degrees, for Single Point Mode.

(outra = 0.0) [real]
Value of the output right ascension in degrees, for Single Point Mode.

(outdec = 90.0 ) [real]
Value of the output declination in degrees, for Single Point Mode.

(outroll= 270.0) [real]
Value of the output roll in degrees for Single Point Mode.

(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 a single attitude quaternion to all formats using the default roll definition:

        attconvert input="0,0,0.7071,0.7071" inform=QUAT

2. Convert a single attitude quaternion to all formats using the standard roll definition:

        attconvert input="0,0,0.7071,0.7071" inform=QUAT alignfile=STANDARD  

3. Convert the Euler angles in an attitude column to quaternions for a Suzaku attitude file:

        attconvert input="ae107010010.att" outfile="ae107010010_eq.att" 
        inform=EULER 
        incol=EULER outcol=QUATERNION alignfile=STANDARD

4. Convert the quaternions in the attitude column QPARAM to both Euler and pointing angles for a Swift attitude file, using a Swift alignment matrix and roll definition:

        attconvert input="sw00020215001sat.fits" inform=QUAT 
        outfile="sw00020215001sat_pe.fits" outform=EULER,POINTING 
        incol=QPARAM outcol=EPARAM,PPARAM alignfile="swalign20041115v012.fits"

SEE ALSO

aspect, attdump,

LAST MODIFIED

February 2016