NAME

ahtempcaldb.pl

USAGE

ahtempcaldb.pl 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 tool. The script then runs ahtrendtemp on the combined FITS file to generate a frequency vs. temperature CALDB file required for time assignment when the SMU is not synchronized with GPS.

The script will only combine temperature and frequency data from a single SMU unit at a time, therefore the tool must be run twice (for SMU-A & SMU-B). The SMU unit is specified via the input extension names, 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 tool 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 tool 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 files fitting filepattern.

filepattern [string]
Name of input FITS file(s) to combine. May be a full file name, or part of a filename common to all files desired; all FITS filenames which match this substring will be considered for the merge.

Subsequently, each of these FITS files must also match either or both of the frequency extension (quartzext) name 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 as output by ahtrendtemp.

(l32ticol = L32TI) [string]
Column in quartz ext 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 temperature data (ahtrendtemp parameter).

(quartzcol = RAW_QUARTZ_CLOCK) [string]
Column with quartz clock count (ahtrendtemp parameter).

(u32ticol = QUARTZ_U32TI) [string]
Column in quartz ext 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) [string]
Input leap second file (or CALDB/REFDATA; ahtrendtemp parameter)

(frqtemfile = freqtemp.caldb.fits) [string]
Existing freq vs. temp CALDB file (ahtrendtemp parameter).

(tempresol = 1.0) [double]
Temperature span over which measurements are averaged (ahtrendtemp parameter).

(stimemax = 500.) [double]
Only use quartz frequencies which are taken within this S_TIME of a temperature measurement. This is to avoid interpolation over a large time span (ahtrendtemp parameter).

(averagemode = 1) [int]
Mode to average frequency: 1) simple average, 2) TBD (ahtrendtemp parameter).

(buffer = -1) [integer]
Row buffering mode: -1=automatic, 0=no buffering, positive=number of rows to buffer

(clobber = NO) [boolean]
Overwrite existing output file (YES, NO)

(chatter = 1) [integer]
Chatter level for output

(logfile = !DEFAULT) [string]
Output log file (DEFAULT, NONE; '!' to clobber)

(debug = NO) [boolean]
Enable debug mode (YES, NO)

(history = YES) [string]
Record tool parameters in HISTORY (YES, NO)

(mode = ql) [string]
Mode of automatic parameters

EXAMPLES

  1. 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.pl . trend_test merged_output.fits trendtemp_outfile.fits trendtemp_outtemp.txt quartzext=HK_TIMING tempext=HK_HCE
        

SEE ALSO

ahtrendtemp, ahmktim

LAST MODIFIED

March 3, 2015