NAME
ahtempcaldb - Calculate a new frequency vs. temperature function
for Hitomi based on housekeeping data and place the results in a new extension in the relevant CALDB file
USAGE
ahtempcaldb indir filepattern outmerge outfile outtemp
DESCRIPTION
This Perl script combines SMU quartz clock frequencies and SMU temperature
data from multiple housekeeping (HK) files into a single FITS file, suitable
as the input to the ahtrendtemp task. The script then runs ahtrendtemp on
the combined FITS file to generate a frequency vs. temperature relation.
The output file containing this table
is a copy of the input CALDB frequency vs. temperature file, with the
new table appended as a new extension (named "FVT", the same as the
original extension). The frequency vs. temperature relation
is required for time assignment when the SMU is not synchronized with the GPS.
The script will only combine temperature and frequency data from a single
SMU unit at a time, therefore the task must be run twice (for SMU-A &
SMU-B). The SMU unit is specified via the input extension names specified by the parameters 'quartzext'
and 'tempext'. For example, the name of the quartz clock extension for SMU-A
is HK_SMU_A_DHFS_TI_MNG_HK_TI_MNG_8N7_BLOCK and the temperature extension is
HK_SMU_A_HCE_HCE_A_SENS_STS. Note: it is possible to run the task with quartz
clock data from SMU-A and temperature data from SMU-B (or vice versa), but the
resulting trend file is not meaningful.
Files to be processed by the task are specified by giving a directory name and
a file name pattern matching the desired HK files.
PARAMETERS
- indir [string]
- Name of input directory in which to search for input files fitting 'filepattern'.
- filepattern [string]
- String to search for the names of input FITS files to combine. This parameter may be a full
file name, or part of a file name common to all files desired; all FITS file names that
contain the string will be considered for the merge.
Each of these FITS files must also have an extension that matches the frequency
extension ('quartzext') name and/or the temperature extension ('tempext') name. The script will
ignore any FITS files whose extension names match neither of these.
- outmerge [file]
- Output merged FITS file with HK frequencies and temperatures; this is the
output of ahtempcaldb.
- outfile [file]
- The output FITS file generated from ahtrendtemp.
- outtemp [file]
- An ASCII file containing frequencies and temperatures that is output by ahtrendtemp.
- (l32ticol = L32TI) [string]
- Column in 'quartzext' with L32TI (ahtrendtemp parameter).
- (quartzext = CLOCK_QUARTZ) [string]
- Name of extension containing quartz clock count, i.e. the frequency data (ahtrendtemp parameter).
- (tempext = TEMPERATURE) [string]
- Name of extension containing the temperature data (ahtrendtemp parameter).
- (quartzcol = RAW_QUARTZ_CLOCK) [string]
- Column with the quartz clock count (ahtrendtemp parameter).
- (u32ticol = QUARTZ_U32TI) [string]
- Column in 'quartzext' of quartz acquisition time (ahtrendtemp parameter).
- (tempcol = TEMP_CALC) [string]
- Column containing SMU temperature in Celcius (ahtrendtemp parameter).
- (stimecol = S_TIME) [string]
- Column containing S_TIME in both frequency and temperature extensions (ahtrendtemp parameter).
- (leapsecfile = CALDB) [filename REFDATA|CALDB|file name]
- Name of the leap second file. If set to CALDB or REFDATA, the file in CALDB or the REFDATA area respectively is used (ahtrendtemp parameter).
- (frqtemfile = CALDB) [filename]
- Existing frequency vs. temperature CALDB file (ahtrendtemp parameter).
The output file 'outmerge' is a copy of this input file with an additional extension appended containing
the new frequency vs. temperature calculation produced by ahtempcaldb.
- (tempresol = 1.0) [double]
- Temperature span over which measurements are averaged (ahtrendtemp parameter).
- (stimemax = 500) [double]
- Only use quartz frequencies, which are taken within an interval 'stimemax' of S_TIME around a temperature measurement. This is to avoid interpolation over a large time span ('stimemax' is an ahtrendtemp parameter).
- (averagemode = 1) [intger]
- Mode to average frequency. Currently, a simple average is the only option ('averagemode=1').
- (buffer = -1) [integer -1|0|N]
- Rows to buffer (-1=auto, 0=none, N>0=number of rows).
- (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 = 1) [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]
- 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
- Merge three FITS files called trend_test_1.fits, trend_test_2.fits, and trend_test_3.fits, all located
in the current directory. Each file contains HK frequency and temperature data, and has extension names
HK_TIMING and HK_HCE for frequency and temperature, respectively. The output merged FITS file is called
merged_output.fits. The outputs from ahtrendtemp are trendtemp_outfile.fits and trendtemp_outtemp.txt.
The file freqtemp.caldb.fits also exists in the current directory.
ahtempcaldb . trend_test merged_output.fits trendtemp_outfile.fits trendtemp_outtemp.txt quartzext=HK_TIMING \
tempext=HK_HCE freqtemp.caldb.fits
SEE ALSO
ahtrendtemp,
ahmktim
LAST MODIFIED
November 28, 2018