| phav | stsdas.hst_calib.hsp | phav |
phav -- Calibrate the discriminator threshold setting.
phav intable outtable scheme
Fit a specified pulse height distribution function to observed digital data obtained for the same target, but at different discriminator threshold settings. The measured count rate will be the INTEGRATED pulse height distribution (IPHD), which is assumed to have the form:
IPHD = 0.5 * P * SQRT(2*pi) * [1 - erf((x-Q)/(R*SQRT(2)))] +
S * (exp(-x/T)) + U
where "erf" is the error function. This is based on the assumption that the
pulse height distribution (PHD) has the form:
PHD = P/R * exp-((x-Q)**2/2*R**2) + S/T * exp(-x/T)
A non-linear least squares fitting algorithm is used to determine the
fitting parameters P, Q, R, S, and T.
After a pulse height model is obtained, this task will look for
an optimal discriminator setting using the method specified in the
scheme parameter.
No calibrational corrections are performed on the input data because most of these data are not obtained at the "standard" discriminator threshold setting where other calibrations are made.
The maximum number of input data points is 2,000.
'DETECTOB' Detector ID (int). 'TRGTNAME' Target name (char*20). 'VOLTAGE' High voltage setting (real). 'DOBJ' Digital count rate (real). 'DOBJ_ERR' Standard deviation of count rate (real). 'THRESH' Discriminator threshold setting (real). 'EPOCH' Epoch of observation (double).
'SCHEME' Scheme used to determine the optimum discriminator
setting (char*16).
'TRGTNAME' Target name (char*20).
'DETECTOR' Detector ID (int).
'NPOINTS' Number of input data points (int).
'ITERMAX' Number of iterations used in the least squares
fitting (int).
'BEST_THRESH' Optimum discriminator setting (real).
'GAUSS_AMPL' Height of the Gaussian component (=P/R) (real).
'GAUSS_WIDTH' Half "width" of the Gaussian component (=R)
(real).
'GAUSS_CENTER' Discriminator setting of the gaussian's center
(=Q) (real).
'EXP_AMPL' Height of the exponential component (=S/T)
(real).
'EXP_WIDTH' "Width" of the exponential component at which
the exponential falls to 1/e (=T) (real).
'BACKGROUND' Constant term in the INTEGRATED PHD (=U) (real).
'CHISQ' Chi squared of the fit (real).
'WEIGHT' Weight flag of digital count (real).
'VOLTAGE' High voltage setting (real).
'TOLERANCE' Fractional sigma-squared change of the last
least squares iteration (real).
'FRACTION' Specified fraction applied to the coefficient
modification during the least squares fitting
(real).
'TEMPMIN' Lowest temperature of all observations (real).
'TEMPMAX' Highest temperature of all observations (real).
'TEMPAVE' Average temperature (real).
'EPOCHMIN' Lower limit of epoch (double).
'EPOCHMAX' Upper limit of epoch (double).
'EPOCHAVE' Average epoch (double).
Scheme used to determine the optimum discriminator setting. The following three options are available: (1) "HALF_PEAK", the optimum setting is half way between the Gaussian peak and the origin, (2) "3HWHM_BELOW_PEAK", the optimum setting is 3 half-width-half-maximum (HWHM) lower than the Gaussian peak, and (3) "MAX_AREA_DIFF", the optimum occurs where the difference between the area under the Gaussian curve and the area under the exponential curve is maximized.
1. Calibrate the optimal discriminator threshold setting from the input data table xphav$input1 and put the results in output table yphav$output. Use HALF_PEAK as the scheme with equally weighted data.
hs> phav "xphav$input1" "yphav$output" scheme="HALF_PEAK"
weight=0.