STScI Logo

deadtimev stsdas.hst_calib.hsp



deadtimev -- Calibrate digital linearity (i.e., pair-pulse correction coefficient or dead time).


deadtimev intable outtable


Fit the following dead time formula between the observed digital count rates and their simultaneously-obtained analog counterparts:

        D = ratio * A / ( 1 + ratio * A * tau)

where D is the observed digital count rate, A is the count rate derived from the simultaneous analog measurement, ratio is a scaling factor to compensate for any possible inaccuracy of the gain factor, and tau is the dead time. A non-linear least squares algorithm is used to determine ratio and tau.

Before actually performing the least squares fitting, raw count rates have to be adjusted, as follows:

        scaled digital count rate = raw digital count rate 

        scaled analog count rate = (((raw analog DN - CVC offset)
                / gain factor - analog dark signal 
                - analog pre-amplifier noise)
                * digital high voltage factor
                / analog high voltage factor) + digital dark signal 
                + digital pre-amplifier noise

The maximum number of input data points is 2,000.


intable [file name]
Name of the input table. The following columns are needed:

'DETECTOB'      Object detector ID (int).
'APERTOBJ'      Object aperture name (char*10).
'VOLTAGE'       High voltage setting (real).
'VGAIND'        Gain setting (real).
'THRESH'        Discriminator setting (real).
'DET_TEMP'      Detector temperature (real).
'DEA_TEMP'      DEA temperature (real).
'EPOCH'         Epoch of observation (double).
'PTSRCFLG'      Point source flag (char*1).

The task also needs the following columns:

'DOBJ'          Digital count rate (real).
'DOBJ_ERR'      Mean error of digital count rate (real).
'AOBJ'          Analog reading (real).
'AOBJ_ERR'      Mean error of analog count rate (real).
outtable [file name]
Name of the output table created by this task. This table will have the following columns:

'DETECTOR'      Detector ID (int).
'NPOINTS'       Number of input data points (int).
'ITERMAX'       Number of iterations used in the least squares
                fitting (int).
'DEADTIME'	Dead time obtained from the fitting (real).
'DEADTIME_ERR'	Error of the dead time (real).
'RATIO'         Scaling factor between digital and analog count
                rate (real).
'RATIO_ERR'	Error of the scaling factor (real).
'CHISQ'         Chi squared of the fit (real).
'TEMPMIN'       Lowest temperature of all observations (real).
'TEMPMAX'       Highest temperature of all observations (real).
'TEMPAVE'       Average temperature (real).
'VOLTAGE'       High voltage setting (real).
'THRESH'        Discriminator setting (real).
'DIGITAL_WT'    Weight flag of digital count (real).
'ANALOG_WT'     Weight flag of analog count (real).
'TOLERANCE'     The fractional sigma-squared change of the last
                least squares iteration (real).
'FRAC'          Specified fraction applied to the coefficient
                modification during the least squares fitting
'EPOCHMIN'      Lower limit of epoch (double).
'EPOCHMAX'      Upper limit of epoch (double).
'EPOCHAVE'      Average epoch (double).
(xweight = -2.) [real]
Weighting flag of analog count rate. The weight of each data point is proportional to the standard deviation with this flag as its exponent. For example, if xweight = 0, equal weights is applied and if 'xweight = -1000' or less, analog counts are assumed to be exactly precise.
(yweight = -2.) [real]
Weighting flag of digital count rate. The weight of each data point is proportional to the standard deviation with this flag as its exponent. For example, if yweight = 0, equal weights is applied. BOTH xweight and yweight can not be set to -1000 or less.
(itermax = 100) [real, min = 1]
Maximum number of iterations to be used in the non-linear least squares fitting.
(tolern = 1.E-12) [real, min = 0., max = 1.]
Tolerance of the "goodness" of the least squares fit. If the FRACTIONAL improvement of the sigma-squared is smaller than tolern, the fit is deemed satisfactory and the least squares iteration will terminate.
(frac = 0.5) [real, min = 0., max = 1.]
Specified fraction applied to the coefficients modification during the non-linear least squares fitting.
(cal_tables = "") [string]
Pset name for calibration file parameters. Parameters can be individually changed from the command line or can be edited as a group using :e from eparam or from the cl, eparam cal_tables or simply cal_tables. Details about these parameters are available by typing "help cal_tables".
(save = no) [boolean]
Save the scratch table containing intermediate calibration corrections? If save = yes, a message will be sent to the terminal and the logfile.


1. Calibrate digital linearity from the input data table xdeadtimev$input1 and put results in the output table ydeadtimev$output while saving intermediate result in another local table whose name will be announced to the user. The analog count rates are weighted equally and the weights of digital count rates are inversely proportional to their variance.

hs> deadtimev "xdeadtimev$input1" "ydeadtimev$output" save=yes
    xweight=0 yweight=-2 




Source Code · Package Help · Search Form · STSDAS