NAME
ahcalctime - Re-run the Hitomi timing tools on an output directory from the Hitomi pipeline
USAGE
ahcalctime indir outdir
DESCRIPTION
The task ahcalctime recalculates the TIME column in Hitomi event and housekeeping (HK) files. As input, the task expects a directory structure as defined for a sequence downloaded from the archive.
The data from the 'indir' directory are copied to the 'outdir' directory. The directory structure inside
'indir' is the same as in 'outdir'; only the files and directories necessary for the tasks to run are copied over.
For example, the event_uf directory is copied, but not the event_cl.
To recalculate time, the script runs the following tasks:
- Runs ahmktim on the TIM file, after making a copy of the original TIM file
- Runs ahtime on the general HK file
- Runs sxssamcnt on the SXS HK file
- Runs sxssamcnt on each SXS unfiltered event file
- Runs sxssamcnt on the SXS lost GTI file
- Runs ahtime on the SXS lost GTI file
- Runs ahtime on each instrument HK file
- Runs ahtime on each instrument unfiltered event file
INPUT
The input directory 'indir' must have the following directory structure
(where lines with "[inst]" are repeated, substituting sxs, sxi, hxi, and sgd with "[inst]"):
indir/auxil/general HK file, TIM file
indir/[inst]/hk/
indir/[inst]/event_uf/*uf.evt
indir/sxs/event_uf/*el.gti
This is the same structure as the pipeline output stored in the archive.
OUTPUT
The following directories and files are copied from 'indir' to 'outdir' and the new time is calculated only for these files:
indir/auxil/*
indir/[inst]/hk/*
indir/[inst]/event_uf/*uf.evt
indir/sxs/event_uf/*el.gti
If 'clobber=yes' and 'outdir' exists, 'outdir' is removed completely before beginning
and a new copy is made from 'indir'. If 'clobber=no' and 'outdir' exists, the script exits with an error. All of the individual tasks operate as though 'clobber=yes'.
The tasks called within ahcalctime create and overwrite, for example, the existing instrument HK file
(in 'outdir') from ahtime. The files in 'indir' are left untouched.
The original TIM file is copied to a new file called [base]_orig.tim, and the new TIM file only keeps the
primary HDU and first extension in order to recreate the second extension.
When calling the timing tools, the script creates intermediate files, then either copies
them or moves them to their final destination based on the value of the 'cleanup' parameter.
PARAMETERS
- indir = indir/ [string]
- Input directory.
- outdir = outdir/ [string]
- Output directory.
- (verify_input = no) [boolean yes|no]
- Whether to verify the input files with ftverify.
- (sorttime = yes) [boolean yes|no]
- If 'sorttime=yes', sort the output time column after calling ahtime on the column specified
in the 'timecol' parameter. All extensions are sorted on this column if the extension contains
the column and has a nonzero number of rows.
- (frqtemfile = CALDB) [filename CALDB|file name]
- Used in ahmktim: The frequency vs. temperature file.
- (sxs_coeftime = CALDB) [filename CALDB|file name]
- Used in sxssamcnt: Input file with arrival time coefficients.
- (coldeffile = CALDB) [filename CALDB|file name]
- Used in ahtime: Input file with column names for the time corrections.
- (delayfile = CALDB) [filename CALDB|file name]
- Used in ahtime: Input instrument delay file.
- (offsetfile = CALDB) [filename CALDB|file name]
- Used in ahtime: Input file with the CAMS offset corrections.
(leapsecfile = REFDATA) [filename REFDATA|CALDB|file name]
- Used in ahmktim, ahtime: Name of the leap second file
If set to CALDB or REFDATA, the file in CALDB or the REFDATA area respectively is used.
- (timext = TIM_LOOKUP) [string]
- Used in ahmktim: Output TIM extension created by the ahmktim task.
- (gaptime = 2.0) [double]
- Used in ahmktim: Minimum time [s] to define a gap.
- (timecol = TIME) [string]
- Used in ahtime: Output time column.
- (gticolumns = START,STOP) [string]
- Used in ahtime: Output GTI column names.
- (cleanup = yes) [boolean yes|no]
- Delete temporary files if 'cleanup=yes'.
- (clobber = no) [boolean yes|no]
- Overwrites the existing output file if set to yes
- (chatter = 2) [integer 0|1|2|3]
- 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 task parameters in HISTORY.
EXAMPLES
-
The script copies the necessary files from 'indir' to 'outdir', then recalculates the time columns on the files in 'outdir'.
ahcalctime indir outdir
SEE ALSO
ahpipeline,
ahmktim,
ahtime,
sxssamcnt
LAST MODIFIED
November 28, 2018