HELP · SEE_ALSO

## NAME

phaz -- Perform a pulse height distribution analysis.

## USAGE

`phaz input eefile intphd difphd fitphd table`

## DESCRIPTION

This task does a pulse height analysis (PHA) of an
input Goddard High Resolution Spectrograph (GHRS) PHA observation.
The differential pulse height
distribution for each diode is computed and fitted by
a Gaussian distribution with a linear baseline. A threshold is computed
for each diode using the center of the fitted Gaussian (`CENT`).
If the center is at `CENT`, then the thresholds are set as follows:

CENT*percent main diode array CENT*percent+corner corner diodes CENT*percent+focus focus diodes ave*pcrad radiation diodes

where `percent`, `corner`, `focus`, and `pcrad` are input parameters,
and `ave` is the average of the thresholds for the main diode
array.

Four output files are produced by `phaz`. Three of these are images
containing the integral, differential, and fitted differential pulse height
distributions. The names of these images are specified by the `intphd`,
`difphd`, and `fitphd` parameters, respectively. The fourth file contains
the results of the threshold analysis and is specified by the `table`
parameter; this table contains results of the Gaussian distribution
for each diode.

## PARAMETERS

- input [file name template]
- Names of files containing the input PHA observation raw data. This data must be sorted in ascending threshold order. A PHA observation will normally have its data in separate groups of a single input file.

- eefile [file name template]
- Names of the extracted engineering trailer files corresponding to
each file or group specified by
`input`. This file contains the data for the 12 special diodes.

- intphd = "intphd" [file name]
- Name of the first output image, which will contain the integral pulse height
distribution. This distribution will be a two-dimensional array of size
(number of thresholds observed) x 512. Each row
`i`of the image contains the integral pulse height distribution for the corresponding diode number`i`. For example, row 50 will contain the integral pulse height distribution for diode number 50.

- difphd = "difphd" [file name]
- Name of the second output image, which will contain the differential pulse height
distribution. This image takes the same form as the image created for
`intphd`.

- fitphd = "fitphd" [file name]
- Name of the third output image, which will contain the fitted differential pulse
height distribution. This image takes the same form as that of
`intphd`and`difphd`.

- table = "phaz" [file name]
- Name of the output table that will contain results of the threshold
analysis. This table has 512 rows (one per diode) and the following columns:
'DIODE' - The diode number from 1 to 512 (integer). 'AMP' - The amplifier number as found in the 'chfile' table (integer). 'CHANNEL' - Channel number (taken from the input channel number file 'chfile') (integer). 'CENTER' - Center of the fitted Gaussian distribution (i.e., the threshold) (double). 'PEAK' - Peak value of the fitted Gaussian (double). 'SIGMA' - Sigma of the fitted Gaussian (in threshold units) (double). 'A0' - Constant term of the linear baseline (double). 'A1' - Slope of the linear baseline (double). 'FWHM' - Full width-half-max of the fitted Gaussian distribution (double). 'THRESH' - Computed threshold (double). 'COUNTS' - The count rate in the integrated PHA data at the choosen threshold (double).

- (t= 30.0) [real, min=1.0, max=200.0]
- Initial threshold level in
`input`(i.e., the threshold level for the first group of the image).

- (delt = 1.0) [real, min=1.0, max=200.0]
- Step size for incrementing the threshold levels in
`input`.

- (percent = 50.0) [real]
- Percentage of the center of the Gaussian distribution at which to set the threshold level.

- (corner = 5.0) [real]
- Threshold offset to be applied to corner diodes.

- (focus = 0.0) [real]
- Threshold offset to be applied to focus diodes.

- (pcrad = 120.0) [real]
- Percentage of the average threshold that is to be used as the threshold for radiation diodes.

- (center = 80.0) [real, min=0.0, max=200.0]
- Initial guess of the center of the Gaussian peaks used by the least squares fit routine.

- (sigma = 5.0) [real, min=1.0, max=50.0]
- Initial guess of Gaussian peaks.

- (niter = 10) [integer, min=1, max=100]
- Number of iterations of the least squares fit routine to perform.

- (chfile = "hrs$templates/amp2diode.txt") [file name]
- Name of the table containing amp and channel numbers for each diode.
This information is copied
to the output threshold file
`table`, allowing the table to be sorted by amp and channel number.

## EXAMPLES

1. Perform the pulse height analysis of the
the images `phadata` and `phaee` using an initial threshold level
of 20 and a step size of 2. The results
will be placed in the output table `ttab`.

cl> phaz.t0 = 20 cl> phaz.delt = 2 cl> phaz phadata.hhh[*] phaee.hhh[*] intphd difphd fitphd ttab

## BUGS

## REFERENCES

Author: Jonathan Eisenhamer

## 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

pha_all, pha_center, pha_diode, pha_rms, pha_sig2rms, pha_summary, pha_text