STScI Logo

darkstat stsdas.hst_calib.hrs.z_calib


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

NAME

darkstat -- Compute statistics on dark count calibration spectra.

USAGE

darkstat input group_stats total_stats events noisy dark

DESCRIPTION

The darkstat task calculates the mean and standard deviation of the science diodes and the special diodes of Goddard High Resolution Spectrograph (GHRS) observations. The task is intended to be used with observations that were taken to obtain dark count calibration. In determining the means, darkstat removes the effects of particle hits and also makes some determination about "noisy" diodes. Statistics on a specific diode can also be requested.

Dark count calibration proposals are usually arranged in the following way.

* The proposal is broken down into sets of related observations,
  usually 16 observations per set.
* Related observations will have similar root STSDAS file names,
  the first 6 characters of each observation set will match.
* Each observation usually consists of 7 groups.
The darkstat task determines statistics at each level, i.e., for each group, observation, and set.

The input data is meant to be the calibrated data. Thus all results will be in count rates. However, if the uncalibrated data is specified (the .d0h files), the results will be in total counts.

This task calculates the following information:

* The mean, standard deviation, and maximums for the science
  diodes after particle hits have been removed.
* The mean value for a diode, if an individual diode was
  specified.
* Mean value of the anti-coincidence counter.
* Mean values of the four background diodes and two
  radiation diodes.
* Number of diodes involved in a particular hit and total
  value of the affected diodes.
* Potentially noisy diodes.

A particle hit is defined as a diode that differs from the mean value of that diode for all the input by a certain amount, or threshold. The user determines what that threshold is in two different ways. If the pthresh parameter is specified, then a diode for any specific group that is greater than the mean for that diode plus pthresh is considered a particle hit. If pthresh is not specified (its value is INDEF), then the pnsig parameter is used. pnsig specifies the number of sigma difference a diode can be from its mean to be considered a particle hit. If pnsig is not specified (its value is INDEF) then no particle hit checking is done. A particle hit can consist of multiple consecutive diodes. Each particle hit found is recorded in the table specified by the events table. For each hit, the starting diode and number of consecutive diodes involved in the event is recorded, along with the total value of all involved diodes. The observation, group, and time (as determined by the PKTTIME keyword) are also recorded.

A noisy diode is a diode whose mean value for all observations differs from the mean value of all the diodes for all related observations by a certain amount, or threshold. The means are calculated after diodes involved in particle hits are removed. The threshold, as for particle hits, can be specified in two ways. If the parameter dthresh is specified, it represents that absolute difference between the global mean and the individual diode mean can be before that diode is considered noisy. If dthresh is not specified (its value is INDEF), then dnsig is used. dnsig specifies the number of sigma the diode mean can be from the global mean before it is considered noisy. Each noisy diode is recorded in the table specified by the noisy parameter.

The contents of the three tables containing the statistics information is as follows. Each row represents data for either an individual group, an observation, or a related observation set.

ROOTNAME
For the group table, it contains the full observation rootname plus the group identifier for the row to which the information pertains. For the obs table, it contains the observation rootname. For the total table, it contains the first 6 characters of the related observation rootname.
MEAN
For the group, obs, and total tables, this contains the mean count rate for that group, observation, or all related observations respectively. If calibrated data was used, this is a count rate. If uncalibrated data was used, this is pure counts.
SIGMA
This contains the standard deviations from the mean.
MAX
This contains the maximum count rate found.
SELECT_DIODE
This contains the mean of a selected diode.
EVENT_DIODES
Contains a count of the number of diodes involved in particle hit events.
EVENT_RATE
Contains the sum of the value of all diodes involved in particle hit events.
ANTI_COIN
This is the mean value of the anti-coincidence counter.
BACKGROUND
This is the mean value of the four background diodes.
RADIATION
This is the mean value of the two radiation diodes.

The contents of the table specified by the events parameter are as follows. Each row represents a single particle hit event.

ROOTNAME
This is the observation rootname appended with the group number.
COUNTS
The total count rate for this particle hit event.
DIODES
This is the number of consecutive diodes involved in this event.
FIRST_DIODE
This is the diode number, from 1 to 500, of the first diode involved in this event.
TIME
This is the value of the header keyword PKTTIME to represent the time that this event occurred.

The contents of the table represented by the noisy parameter is as follows. Each row represents the data of a noisy diode.

ROOTNAME
The rootname plus group number which the noisy diode can be found in.
DIODE
The diode number, from 1 to 500, of the noisy diode.
COUNT RATE
The count rate found in the diode.
MEAN
The mean value for that diode of all the input observations.
SIGMA
The standard deviation of the MEAN.

The table represented by the parameter dark is a bit different from those described above. It contains 500 rows, one row for each diode. Each column represents the mean value for each diode for the set of related observations that is the name of the column. Thus, if the set of data represented the observation set z0n209, the column name would be z0n209 and the 500 rows in the column would be the mean value for each diode of that set.

PARAMETERS

input [file name list]
Name of the image(s) that contain the science data for the dark count calibrations.
group_stats = "group_stats.tab" [file name]
Table that will contain the dark statistics for each individual group of the input data. If the table does not exist, it will be created. If the table does exist, the data will be append to the pre-existing table. If no table is specified, no data will be written.
obs_stats = "obs_stats.tab" [file name]
Table that will contain the dark statistics for each individual observation of the input data. If the table does not exist, it will be created. If the table does exist, the data will be append to the pre-existing table. If no table is specified, no data will be written.
total_stats = "total_stats.tab" [file name]
Table that will contain the dark statistics for each set of related observations of the input data. If the table does not exist, it will be created. If the table does exist, the data will be append to the pre-existing table. If no table is specified, no data will be written.
events = "events.tab" [file name]
Table that will contain the particle hit information.

If the table specified by this parameter already exists, data will be appended, otherwise a new file will be created. If no table name is specified, no output will be written.

noisy = "noisy.tab" [file name]
Table that will contain the noisy data information. If the table specified by this parameter already exists, data will be appended, otherwise a new file will be created. If no table name is specified, no output will be written.
dark = "dark.tab" [file name]
Table that will contain the means of each diode for each set of related observations. If the table does not exist, it will be created. If the table does exist, the data will be append to the pre-existing table. If not table is specified, no data will be written.
(verbose = yes) [boolean]
Display information about particle hits and noisy diodes?
(pthresh = INDEF) [real]
Absolute difference between a diode and the mean for that diode among data indicating that it was a victim of a particle hit.

If not specified (value is INDEF), then the pnsig parameter is used.

(pnsig = 4.) [real]
Sigma difference that a diode can be from the mean for that diode among all observations before it is considered a victim of a particle hit. This is used if pnsig is specified and pthresh is not specified. If pnsig is undefined (INDEF), no particle hit detection is done.
(dthresh = INDEF) [real]
Absolute difference between the mean value of a diode for all related observations and the mean value of all diodes for related observations that constitutes whether the diode is noisy. If this is INDEF, then dnsig is used.
(dnsig = 4.) [real]
If dthresh is not specified, this parameter represents the number of sigma difference the mean of a diode for all related observations can be from the mean of all diodes for related observations before it is considered noisy.

If neither dthresh nor dnsig is specified, then no noisy diode checking is done.

(dnum = INDEF) [integer, min=1, max=500]
Diode number used to determine the mean during all calculations.

Results are written to the group, obs, and total statistics tables (see description above).

EXAMPLES

1. Determine the dark count statistics for all the calibrated data in the current directory.

    cl> darkstat *.c1h

2. Only produce the statistics for the related observations.

    cl> darkstat *.c1h "" "" total_stats.tab "" ""

3. For this set of observations, particle hits are know to have a count rate .4 higher than the mean.

    cl> darkstat *.c1h pthresh=.4

4. Do not perform particle hit or noisy diode detection.

    cl> darkstat *.c1h pthresh=indef pnsig=indef dthresh=indef \
    >>>  dnsig=indef

5. First determine statistics for a set of observations in directory PROP1 and then append the statistics from observations in directory PROP2.

    cl> darkstat PROP1$*.c1h
    cl> darkstat PROP2$*.c1h

BUGS

REFERENCES

STSDAS Contact: 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

darksum, parthitz


Source Code · Search Form · STSDAS