           Automatically choose between tgdetect and tg_findzo for determining the zeroth order centroid

tg_choose_method infile method [verbose]

CIAO has two primary methods for determining the zeroth order centroid in ACIS observations, the familiar point-source image-detection (celldetect, via tgdetect) and for bright sources, use of the CCD frame-shift streak (tg_findzo). The latter is necessary if the zeroth order is heavily distorted by pileup, or if it is blocked from telemetry. tg_choose_method will make a good guess at the appropriate method from the observation itself.

The choice of method is based on the relation between the zeroth order count rate and the dispersed spectrum rate. Using empirical values from over 700 observations processed with both tgdetect and tg_findzo, criteria have been derived which are sensitive to the zeroth order quality and which provide the correct choice of method in all but a few cases. This program simply uses a priori defined regions in the zeroth order vs dispersed rate plane in which each method is preferred.

Some cases are pathological and will always require human intervention to review the result (e.g., very crowded fields, very bright, extended sources). Tests have shown that the correct method is chosen in all but about 2% of the cases.

The tool requires that tg_findzo has been run and produced a valid source file. This file has an HDUCLAS3 header keyword value of FINDZO, contains the zeroth order's counts (in table column NET_COUNTS), the grating arm's counts (in header keyword COUNT_TG), and the frame-shift streak's counts (in header keyword COUNT_ST).

tg_choose_method infile=src1a.fits

Take the src1a file produced by tg_findzo and set the output parameter 'method'.

Name of Input src1a file.

The input file must be produced by tg_findzo which contains the header keywords of HDUCLAS3, COUNT_TG, COUNT_ST and TIMEDEL and the column of NET_COUNTS.

Output of the selected program's name, tgdetect or tg_findzo. The default value is "unknown", and an allowed value is "none" (for possible future use).

Program verbosity, 0 (least) to 5 (most).

See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

December 2022