STScI Logo

taflat stsdas.hst_calib.hsp



taflat -- Calculate an average flat field of the High Speed Photometer's (HSP) target acquisition aperture.


taflat infiles inmasks intable outfile outmask nfiles type target


The average flat-field pixel value is the average of all measurements made at the same pixel in different files. Each single measurement in each file must first be normalized by the average count of that individual file and, if it has digital data, divided by the integration time. If any pixel in any file has a bad mask value, that point is not included in the final result.

The maximum number of input data points for each file is 1,000. Only single-group files will be processed.


infiles [file name template]
Names of the input files to be averaged.
inmasks [file name template]
Names of the files containing data quality masks corresponding to the input files.
nfiles [integer]
Number of input files.
intable [file]
Name of the input table; this table contains the following columns:

(count_key)     Observed counts, e.g., if the object detector is 
                used, and the data type is digital, the actual 
		column name containing observed counts will be 
		'DOBJ' (real).
(inttm_key)     Integration time, e.g., if the object detector 
		is used, the actual column name will be 
		'OBJINTTM' (real).
(temp_key)      Temperature (real). The actual column name is 
		passed from the 'temp_key' parameter (real).
(apert_key)     Aperture name, e.g., if the sky detector is used, 
		the actual column name will be 'APERTSKY' 
'EPOCH'         Epoch of observation (double).
outfile [file name]
Name of the output file created by taflat; this file will contain the average flat field. The header will have the following keywords:

'TEMPAVE'       Average temperature (real).
'TEMPMAX'       Maximum temperature (real).
'TEMPMIN'       Minimum temperature (real).
'EPOCHAVE'      Average epoch (double).
'EPOCHMAX'      Maximum epoch (double).
'EPOCHMIN'      Minimum epoch (double).
outmask [file name]
Data quality mask file associated with outfile.
type = "digital" [string, allowed values = digital | analog]
Data type.
target = "obj" [string, allowed values = obj | sky]
Target type.
(temp_key = "DET_TEMP") [string]
Column name of the temperature in input table.
(okval = 1.) [real]
Mask value of a good pixel.
(hitval = 0.) [real]
Mask value of a bad pixel.


1. Calculate an average flat field from the input files listed in the infiles.lis list file and the input data quality masks specified in the inmasks.lis list file. Put results in an output file called ytaflate$output.hhh and an associated output mask file called ytaflat$output.msh. The input table is xtaflat$input. There are three input files and masks. The data type is "digital" and the target type is "obj". The list file infiles.lis contains the following file names:


and the list file 'inmasks.lis contains the following file names:


hs> taflat "@infiles.lis" "@inmasks.lis" "xtaflat$input"
            "ytaflat$output.hhh" "ytaflat$output.msh" 3 "digital"

or, the command could be entered as

hs> taflat "xtaflat$infile![1-3].hhh" "xtaflat$infile![1-3].msh"
            "xtaflat$input" "ytaflat$output.hhh" "ytaflat$output.msh"
            3 "digital" "obj"

or, if these three file pairs are the only such files in the 'xtaflat'
directory, the command could be entered as

hs> taflat "xtaflat$infile*.hhh" "xtaflat$infile*.msh"
            "xtaflat$input" "ytaflat$output.hhh" "ytaflat$output.msh"
            3 "digital" "obj"

If list files are used (as they are in the first sample command above), the list files must be local files, that is, in the current directory.




Source Code · Package Help · Search Form · STSDAS