 NAME · USAGE · DESCRIPTION · PARAMETERS: · EXAMPLES · BUGS
REFERENCES · HELP · SEE_ALSO

## NAME

deadtimey -- Compute FOS paired-pulse coefficients.

## USAGE

deadtimey observed expected table pptab

## DESCRIPTION

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

```	y = x / (1 + tx)

where:
y - is the observed count rate,
x - is the true count rate,
t - is a 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.
q0 and q1 are determined as follows:
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 selectable
user values.
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 vectors of observed count rates. The maximum total number of data points in all input files is 50,000.
expected [file name template]
File names of the vectors of expected count rates corresponding to the file names specified in observed.
table = "deadtimey" [file name]
Output table of fit results. 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 "fos" (char*3).
'DETECTOR'   - Detector number (1 for amber, 2 for blue) (integer).
'TAU1'       - Set to 0.0 (real).
'EPSILON'    - Set to 0.0 (real).
'THRESHOLD'  - Set to value of 'threshold' parameter (double).
'Q0'         - First paired-pulse coefficient (double).
'Q1'         - Second paired-pulse coefficient (double)
'F'          - Set to the value of the 'f' parameter (double).
'ITERATIONS' - Set to 1 (integer).
```
(f = 50000.0) [real]
Threshold above which the linear function for the time coefficient is to be used.
(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= 70000.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.
(detector = "both") [string, allowed values: amber | blue | both]
Detector name for which this calibration is to be used. If set to "both", the output table, pptab, will have two rows (one per detector), otherwise, pptab will have one row corresponding to the specified detector.
(eps = 0.1) [real]
The RSDP error allowed in paired-pulse correction (this is not used in deadtimey).
(iter = 10.0) [real]
The number of iterations in RSDP (this is not used in deadtimey).

## EXAMPLES

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

```  hr> deadtimey obs exp fittab pptab
```

Now plot the computed time coefficient (column TIME in fittab) as a function of the observed count rate (column OBSERVED in fittab). Examine the plot to identify better choices for c1, c2, c3, c4, and f. For example, the following adjustments might be made:

```  hr> deadtimey.c2 = 45000.
hr> deadtimey.f = 48000.
```

The deadtimey task can now be rerun with the new parameters.

```  hr> deadtimey
```

## REFERENCES

Howard Bushouse, STSDAS

## HELP

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