NAME

ahmkehk - Extract and calculate parameters from orbit and attitude (EHK)

USAGE

ahmkehk attfile orbfile outfile

DESCRIPTION

'ahmkehk' reads satellite orbit and attitude files for a given observation, and generates an Expanded Housekeeping (EHK) file.The EHK file contains many parameters related to the attitude SAA, cut-off rigidity, and other orbital information, that are not supplied in any housekeeping or other auxiliary file. The content of the EHK is use to screen the data.

The time coverage of the output file is based on the 'tstart' and 'tstop' input parameters (seconds since the start of the misson). The input 'attfile' is used as the basis of the output times if 'tstart' or 'tstop' is 0 and 'reference'=NONE. These start and stop times can be extended using the 'textend' parameter, and the output columns is calculated by extrapolation if necessary. The 'bintime' parameter defines the time sampling of the output file. All times are in seconds.

The pointing is derived from the columns specified by 'attform' parameter, in the extension specified by the 'attcol' parameter, in the file specified by the 'attfile' parameter. The column must be in the format of either a three-component Euler angle array ('attform'=EULER) or four-component quaternion ('attform'=QUAT).

The orbit position is computed from the orbital elements stored in the columns in the extension given by the 'orbext' parameter in the file given by the 'orbfile' parameter. If the 'orbform' parameter is set to KEPLERIAN, these columns are A (semi-major axis), E (eccentricity), I (inclination), AN (ascending node right ascension), AP (ascending node angle), and MA (mean anomaly) unless overridden by the 'orbcol' parameter. If 'orbform' is set to COMPONENTS, the individual components of the orbital velocity are extracted from the VX, VY, and VZ columns unless overridden by the 'orbcol' parameter. If 'orbform' is set to VECTOR, these velocity components are read from a single vector column specified by 'orbcol'.

The file corresponding to the 'teldeffile' and the values given by the 'optaxis' parameter contain the information needed to transform between coordinates related to pointing, Hitomi focal plane, and sky coordinate systems. The TELDEF file set by 'teldeffile' is that for a fiducial instrument defined as the SXI, and the 'optaxis' parameter is a comma-delimited list of Hitomi optical axis FOC coordinates for HXI1 (FOCX), HXI1 (FOCY), HXI2 (FOCX), HXI2 (FOCY), SXI (FOCX), SXI (FOCY), SXS (FOCX), and SXS (FOCY), respectively.

'ahmkehk' creates an output file that includes three columns that store values of the cutoff rigidity (COR, COR2, COR3). The rigidity tables (in the form of geographic longitude/latitude map images) that provide data for COR2 and COR3 are specified by the 'cor2file' and 'cor3file' parameters. By default these correspond to the table used to calculate COR2 for Suzaku, and a recalculation based on on the IGRF (International Geomagnetic Reference Field) model (updated 2015) calculated for year 2016.0. The 'saafile' parameter determines the origin of the calculation of the satellite position with respect to the SAA, and contains the longitude and latitude of the vertices that define the SAA for each Hitomi instrument.

PARAMETERS

attfile [filename]
Input Hitomi attitude file.

orbfile [filename]
Input Hitomi orbit file, assumed to have the same format as Suzaku version 2 orbit files.

outfile [filename]
Output file in expanded housekeeping (EHK) format, containing a time series of quantities derived from the Hitomi instrument attitude and spacecraft orbit.

(tstart = 0.0) [real]
Start of mission time interval of the output file [s]. If either tstart or tstop is 0.0, the time interval is set equal to the time range of the reference file if there is one, or else to that of the attitude file.

(tstop = 0.0) [real]
End of mission time interval of the output file [s]. If either tstart or tstop is 0.0, the time interval is set equal to the time range of the reference file if there is one, or else to that of the attitude file.

(bintime = 1.0) [real]
Time sampling interval of the output file [s].

(textend = 0.0) [real]
Time added to the beginning and end of the output file time interval, preceding tstart and following tstop [s].

(reference = NONE) [filename]
Reference file supplying the actual time points to be calculated for the output file, overriding tstart and tstop. If NONE these are supplied by the input attitude file.

(timecol = TIME) [string]
Name of the column containing mission time in the reference file.

(attext = ATTITUDE) [string]
Name of the extension in the attitude file ('attfile') with pointing information.

(attform = EULER) [string: EULER|QUAT]
Format of the input attitude column in the 'attext' extension of 'attfile'.

(attcol = EULER) [string]
Name of the input attitude column in the 'attext' extension of 'attfile'.

(teldeffile = CALDB) [filename]
Name of the TELDEF file giving the coordinate systems of the SXI instrument, which is used fiducially to obtain sky coordinates. If set to CALDB (the default), the file is read from the calibration database.

(optaxis = 1215.5,1215.5,1215.5,1215.5,1215.5,1215.5,1215.5,1215.5) [string]
X and Y optical axis coordinates in FOC coordinates for HXI1, HXI2, SXI, and SXS instruments, respectively.

(cor2file = CALDB) [filename]
Name of the file that provides the cutoff rigidity as a function of terrestrial coordinates used to fill the COR2 column. If CALDB, the file used for Suzaku is read from the calibration database.

(cor3file = CALDB) [filename]
Name of the file that provides the cutoff rigidity as a function of terrestrial coordinates used to fill the COR3 column. If CALDB, the file calculated based on the International Geomagnetic Reference Field (IGRF) 2016 file is read from the calibration database.

(saafile = CALDB) [filename]
Name of the file that contains the vertices that define the SAA for each Hitomi instrument. If CALDB, the file is read from the calibration database.

(leapsecfile = CALDB) [filename]
Name of the file giving the table of leap seconds. If CALDB, the file is read from the calibration database.

(orbext = ORBIT) [string]
Name of the extension in the orbit file ('orbfile').

(orbcol = A) [string]
Name of the input orbit column in the 'orbext' extension of 'orbfile'.

(orbform = KEPLERIAN) [string]
Format of the input orbit velocity column in the 'orbext' extension of 'orbfile'.

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

(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 ql|hl|q]
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. Create the extended HK file ah000506304.ehk from attitude and orbit files ah000506304.att.gz and ah000506304.orb.gz

ahmkehk attfile=ah000506304.att.gz orbfile=ah000506304.orb.gz outfile=ah000506304.ehk

2. Create the extended HK file ah000506304.ehk from attitude and orbit files ah000506304.att.gz and ah000506304.orb.gz using the quaternion column QPARAM in the attitude file.

ahmkehk attfile=ah000506304.att.gz orbfile=ah000506304.orb.gz outfile=ah000506304.ehk attcol=QPARAM attform=QUAT

SEE ALSO

ahfilter, aemkehk makefilter, xrtfilter

LAST MODIFIED

27 January 2016