REFERENCES · HELP · SEE_ALSO

## NAME

odeadtimez -- Compute the GHRS paired-pulse coefficients.

## USAGE

`odeadtimez observed expected table pptab`

## DESCRIPTION

This routines computes the diode paired pulse coefficients for the following equation:

y = x / (1 + tx) where: y - observed count rate, x - true count rate, and t - time constant which is a piece-wise linear function of Y. If y <= f then t = q0, if y > f then t = q0 + q1 * (y - f), where 'f' is an input parameter. The parameters 'q0' and 'q1' are determined by the following method: 1) For each pair of observed, x(i), and expected, y(i), count rates, the effective time coefficient, t(i), is computed by: t(i) = (x(i) - y(i)) / (x(i) * y(i)) 2) The values of t(i) where c1 < y(i) < c2, are averaged to give 'q0'. 'c1' and 'c2' are set by the user. 3) A linear least squares fit is done for pairs of y(i) and t(i) for points where c3 < y(i) < c4. 'c3' and 'c4' are user selectable parameters. The fit gives coefficients 'q1' to the linear equation passing through the point (f,q0).

## PARAMETERS:

- observed [file name template]
- File names of the images of observed count rates. The maximum total number of data points in all input images is 50,000.

- expected [file name template]
- File names of the images of expected count rates corresponding
to the the images in
`observed`.

- table = "odeadtimez" [file name]
- Output table for the fit results produced by
`odeadtimez`. This table will have the following columns:'OBSERVED' - Observed count rates (real). 'EXPECTED' - Expected count rates (real). 'TIME' - Computed time coefficient for each data point (real). 'TIME_FIT' - Fitted time coefficient for the observed count rate (real). 'EXPECTED_FIT' - Fitted expected count rates for the observed count rates (real).

- pptab = "pptab" [file name]
- Name of the output paired-pulse table for use by the Routine Science
Data Processing (RSDP) system. This table will contain
the following columns (the columns
`TAU1`,`EPSILON`, and`ITERATIONS`are not used by this task):'INSTRUMENT' - Set to "HRS" (char*3). 'DETECTOR' - Detector number, either "1" or "2" (integer). 'TAU1' - Set to "0.0" (real). 'EPSILON' - Set to "0.0" (real). 'THRESHOLD' - Set to the value of the 'threshold' parameter (double). 'Q0' - First computed coefficient (double). 'Q1' - Second computed coefficient (double). 'F' - Set to input parameter F. (double). 'ITERATIONS' - Set to "1" (integer).

- (f = 50000.0) [real]
- Threshold above which to use the linear function for the time coefficient.

- (c= 30000.0) [real, min=0.0, max=100000.0]
- Lower limit of the count rate range for computing
`q0`.

- (c= 40000.0) [real, min=0.0, max=100000.0]
- Upper limit of the count rate range for computing
`q0`.

- (c= 50000.0) [real, min=0.0, max=100000.0]
- Lower limit of the count rate range for computing
`q1`.

- (c= 60000.0) [real, min=0.0, max=100000.0]
- Upper limit of the count rate range for computing
`q1`.

- (threshold = 1.0) [real]
- Value of the threshold used by RSDP to decide if a correction to the input observed count rate is needed. This parameter is simply copied to the output table.

- (eps = 0.1) [real]
- Allowed error in the paired-pulse correction---used by RSDP.

- (iter = 10.0) [real]
- Number of iterations allowed in RSDP.

- (detector=0) [integer, min=0, max=2]
- Detector number being used for this calibration. If set
to "0" (for both detectors), the
`pptab`output table will have two rows (one per detector). Otherwise,`pptab`will have one row corresponding to the specified detector.

## EXAMPLES

1. Compute the paired-pulse coefficients using the data images
`obs` and `exp`.

cl> odeadtimez obs exp fittab pptab

Now plot the computed time coefficient (the `TIME` column in the table
`fittab`) as a function of the
observed count rate (the `OBSERVED` column in `fittab`). Examine the plot to
identify better choices for `c1`, `c2`, `c3`, `c4`, and `f`. Make any necessary
adjustments, for example, the following two commands define new values for
the `c2` and `f` parameters.

hr> odeadtimez.c2 = 45000. hr> odeadtimez.f = 48000.

Now rerun `odeadtimez` with the new parameters.

hr> odeadtimez

## BUGS

## REFERENCES

## HELP

For assistance using this or any other tasks, please contact help@stsci.edu or call the help desk at 410-338-1082.

## SEE ALSO