Last modified: December 2022

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/tgdetect2.html
AHELP for CIAO 4.17

tgdetect2

Context: Tools::Gratings

Synopsis

Bundles three programs: tg_findzo, tg_choose_method, and tgdetect into one in order to provide a more convenient interface for determination of the zeroth order centroid.

Syntax

tgdetect2  infile outfile [zo_pos_x] [zo_pos_y] [unlearn_tgdetect]
[unlearn_tg_findzo] [verbose] [clobber]

Description

CIAO provides two algorithms for for determining the zeroth order centroid location in ACIS observations. First is the familiar point-source image-detection tool tgdetect (which runs celldetect). For bright sources where the zeroth order is heavily distored by pileup or if it was blocekd from telemetry, the tg_findzo tool should be used. The choice of which tool can be determined automatically by performing some simple analysis of the tg_findzo results.

This program will run tg_findzo, tg_choose_method, and tgdetect and provide a source table ("src1a" file) created using the best method. Note that the choices are only appropriate for grating observations using the ACIS detector; with HRC, tgdetect is always used.

The method used will be recorded in the output file's header with the keyword TGMETHOD.


Example

tgdetect2 infile=evt1.fits outfile=src1a.fits zo_pos_x=default
zo_pos_y=default

Take evt1 file and create a src1a fits file.


Parameters

name type ftype def min max reqd
infile file input       yes
outfile file output       yes
zo_pos_x string   default      
zo_pos_y string   default      
unlearn_tgdetect boolean   yes      
unlearn_tg_findzo boolean   yes      
verbose integer   0 0 5  
clobber boolean   no      

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input)

Input event file name.

Parameter=outfile (file required filetype=output)

output src1a file name.

Parameter=zo_pos_x (string default=default)

Initial guess for the target sky coordinate X. It can be "default" or a real number. For 'default', the tool takes RA_TARG, DEC_TARG in the input header and converts it to the sky coordinates.

Parameter=zo_pos_y (string default=default)

Initial guess for the target sky coordinate Y. It can be "default" or a real number. For 'default', the tool takes RA_TARG, DEC_TARG in the input header and converts it to the sky coordinates.

Parameter=unlearn_tgdetect (boolean default=yes)

Default value is yes to do a punlearn on tgdetect to set all its parameters to the defaults.

Parameter=unlearn_tg_findzo (boolean default=yes)

Default value is yes to do a punlearn on tg_findzo to set all its parameters to the defaults.

Parameter=verbose (integer default=0 min=0 max=5)

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

Parameter=clobber (boolean default=no)

Remove output file if it already exists?


Changes in CIAO 4.15

The header of the new file (the outfile parameter) will now contain the parameter settings for this tool. It can be retrieved with the dmhistory tool or the get_history_records method of the pycrates python library.


Bugs

There are no known bugs for this tool.

See Also

chandra
eventdef
tools::composite
combine_grating_spectra
tools::gratings
detilt, dewiggle, symmetrize, tg_bkg, tg_choose_method, tg_create_mask, tg_findzo, tg_resolve_events, tgdetect, tgextract, tgextract2, tgidselectsrc, tgmask2reg, tgmatchsrc, tgsplit
tools::response
mktgresp
tools::table
dmtype2split