| 
 
      Create a region file that labels distances along the grating arm
     
tg_scale_reg  infile outfile x y rot_ang grating instrument [script]
[scale] [values] [verbose] 
      
        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.
       
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. 
	   
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.      
	   
	  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.  	  
	   
	  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.
	   
	  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.
	   
	  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".
	   
	  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.
	   
            Verbose can be from 0 to 5, generating different
            amounts of output.
          |