About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: March 2007

URL: http://cxc.harvard.edu/ciao3.4/tg_scale_reg.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 tg_scale_reg Context: tools

Synopsis

Create a region file that labels distances along the grating arm

Syntax

tg_scale_reg  infile outfile x y rot_ang grating instrument [script]
[scale] [values] [verbose]

Description

It can be useful to visualize the wavelengths or energies directly on the sky image of a grating observation, e.g. to see what the chip coverage is or where contaminating sources lie. tg_scale_reg creates an ASCII region file which annotates the dispersion distance along the grating arm in wavelength or energy units.

There are two methods for running the script:

  • Using a FITS region file as input: only the "infile" and "outfile" parameters are required.
  • Without an input file: in the case where a FITS file is not available, the input information can be provided by the "x", "y", "rot_ang", "grating", and "instrument" parameters. The "outfile" is still required.

This script is used in the Measure Grating Dispersion Distance thread.

Example 1

tg_scale_reg acisf01010N001_evt2.fits wave_1010.reg

The script is run with a FITS file for input, so only an output file name must be specified. The REGION block appended to acisf01010N001_evt2.fits is used to create the output ruler file. The default scale and values are used.

Example 2

tg_scale_reg infile="" outfile=meg_energy.reg x=4101 y=4089
rot_ang=262.65257 grating=meg instrument=acis scale=kev

The source position, rotation angle, grating arm, and instrument were obtained from an event file header and are used instead of setting the "infile" parameter. The scale will be in energy [keV] instead of wavelength.

Parameters

name type ftype def min max reqd
infile file input       yes
outfile file output       yes
x real input       yes
y real input       yes
rot_ang real input       yes
grating string input leg     yes
instrument string input acis     yes
script file input        
scale string input angstrom      
values string input        
verbose integer   0 0 5  

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input)

Input FITS file

The input file must be a grating evt1a.fits or evt2.fits file that has a REGION block extension (created by tg_create_mask and appended to the file by tg_resolve_events).

This parameter is not required when running the script by specifying the "x", "y", "rot_ang", "grating", and "instrument" parameters.

Parameter=outfile (file required filetype=output)

Output filename

The output is an ASCII region file that can be displayed over the data in ds9.

Parameter=x (real required filetype=input)

x source position in sky coordinatess

This parameter is not required if an "infile" is provided.

Parameter=y (real required filetype=input)

y source position in sky coordinatess

This parameter is not required if an "infile" is provided.

Parameter=rot_ang (real required filetype=input)

Rotation angle

The roll angle for the observation, which is stored in the ROLL_NOM header keyword.

This parameter is not required if an "infile" is provided.

If you are working with a multiobi dataset, the ROLL_NOM value in the merged evt2 file may not produce truly accurate results from this script. For the most reliable grating scale, run tg_scale_reg.sl on each evt1a dataset. It is also possible to use the command line method, substituting the ROLL_PNT header keyword value where ROLL_NOM is used in the example.

Parameter=grating (string required filetype=input default=leg)

Grating arm

Allowed values are "leg", "hetg", "heg", or "meg". If "hetg" is used, the output file will contain information for both the HEG and MEG arms.

This parameter is not required if an "infile" is provided.

Parameter=instrument (string required filetype=input default=acis)

Instrument used for the observation

Allowed values are "acis" or "hrc".

This parameter is not required if an "infile" is provided.

Parameter=script (file filetype=input)

S-Lang script with tg_scale_reg() function

tg_scale_reg is an slsh wrapper that allows tg_scale_reg.sl to be run from the command line. This parameter defines the location of tg_scale_reg.sl.

The default value of the script parameter is set for the standard CIAO scripts installation: ${ASCDS_CONTRIB}/share/slsh/local-packages/tg_scale_reg.sl

Parameter=scale (string filetype=input default=angstrom)

Distance units for the scale

Allowed values are "keV" or "angstrom".

Parameter=values (string filetype=input)

Comma-separated list of the values to be annotated

This parameter allows the user to customize which energies or wavelengths are marked on the scale. For instance, setting values="1.0 2.0 3.0 4.0 5.0" with an energy scale will place a marker at 1 kev intervals from 1-5 keV.

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

Verbose can be from 0 to 5, generating different amounts of output.

NOTES

This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see the installation instructions page for help on installing the package.

Bugs

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

Hardcopy (PDF): A4 | Letter
Last modified: March 2007



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.