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

Skip the navigation links
Last modified: 1 Dec 2006
Hardcopy (PDF): A4 | Letter

Source Position for Grating Data with a Piled or Blocked Zero Order

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - reviewed for CIAO 3.4: no changes

Synopsis:

The tgdetect tool is used to find the centroid of the zero-order image in a grating event list. If the zero-order source is piled, there is the potential for the centroid to be incorrect due to the "hole" created in the data.

When observing a bright source (e.g. Cygnus X-2, ObsID 1102), the proposer may choose to have the zero-order region blocked via on-board software to avoid telemetry problems.

Either of these situations may result in a misplaced zero order, which affects event order sorting and will lead to incorrect wavelength scales.

Purpose:

To determine the correct source position for a grating observation with piled or blocked zero order. New spectral data is extracted with the updated source position.

Read this thread if:

you are working with an ACIS grating observation that suffers from pileup or was done with the zero order blocked.

Related Links:

Proceed to the HTML or hardcopy (PDF: A4 | letter) version of the thread.




Contents



Get Started

Sample ObsID used: 1927 (HETG/ACIS-S, Vela X-1)

File types needed: evt1; asol1

This is a grating observation which suffers from pileup, as as evident in the "hole" in the source, seen in Figure 1 [Link to Image 1: Piled grating observation]. The same approach may be applied to an observation in which the zero order was blocked, shown in Figure 2 [Link to Image 2: Grating observation with blocked zero order].

Accuracy of this method

The method described herein is the best available in CIAO at this time. The results of this thread should be used as a first approximation to the location of the zero order. Users may need to iterate manually to find a solution sufficiently accurate for reliable spectral analysis.

Be aware that the dmcoords output can be off by half a pixel, which can amount to more than a FWHM between plus and minus orders.

The most accurate way to determine the zero-order sky centroid is from the intersection of the frame-shift streak and the trace of the MEG arm. A script which performs this calculation is in development. Figure 3 [Link to Image 3: Comparison of line counts profiles based on zero-order position determination] shows line counts profiles for plus and minus orders for different zero-order source position determinations. The top plot shows the profiles for the position found by dmcoords, while the bottom plot uses the position from a prototype script named findzo.sl.



Determine the Correct Source Location

Whether the observation is piled or blocked, it is difficult to determine accurately from the data file where the center of the source distribution should be. A workaround for this situation is to use the known position from SIMBAD, NED, or another reputable source.

From SIMBAD, we find that the known position for Vela X-1 is (RA,DEC) = (09:02:06.86, -40:33:16.9).

The CIAO grating tools require the source values to be in sky coordinates, so we need to use dmcoords to convert them. After setting the celestial coordinate format to sexagesimal, the tool is run in interactive mode:

unix% punlearn dmcoords
unix% pset dmcoords asolfile="pcadf097928048N001_asol1.fits"
unix% pset dmcoords celfmt=hms
unix% dmcoords acisf01927_000N001_evt1.fits
dmcoords>: cel 09:02:06.86 -40:33:16.9
(RA,Dec):     09:02:06.859    -40:33:16.90   
(RA,Dec):      135.52858      -40.55469 deg
THETA,PHI           38.8"         12.08 deg
(Logical):        4170.59       4123.34
SKY(X,Y):         4170.59       4123.34
DETX,DETY         4173.56       4112.99
CHIP ACIS-S3       292.36        249.05
TDET              4209.36       1951.05
GDPX,GDPY        32768.50      16384.50
GAC R,D            0.00          0.00
ENERGY 1.000000
ZO(RA,Dec):     09:02:06.860    -40:33:16.90   
ZO(RA,Dec):      135.52858      -40.55469 deg
ZO SKY(X,Y):         4170.59       4123.34
ZO DETX,DETY         4173.56       4112.99
dmcoords>: q

The new source position in sky pixels is (4170.59, 4123.34).



Run tg_create_mask with New Source Position

While it is possible to manually input a source position into tgdetect, the tool will only use it as a starting point for the source detection. There is no guarantee that the output region will be centered on the coordinates we want.

Instead of running tgdetect again, we proceed to tg_create_mask. This tool determines the location of the HEG and MEG arms and creates a mask that will be used for the spectral extraction. The use_user_pars option and related parameters allow us to set the zero-order position, which is used exactly as it is input.

unix% punlearn tg_create_mask
unix% pset tg_create_mask infile=acisf01927_000N001_evt1.fits
unix% pset tg_create_mask outfile=1927_evt1_L1a.fits
unix% pset tg_create_mask use_user_pars=yes
unix% pset tg_create_mask last_source_toread=A
unix% pset tg_create_mask sA_id=1
unix% pset tg_create_mask sA_zero_x=4170.59
unix% pset tg_create_mask sA_zero_y=4123.34
unix% pset tg_create_mask sA_zero_rad=50
unix% pset tg_create_mask sA_width_heg=35
unix% pset tg_create_mask sA_width_meg=35
unix% tg_create_mask
Input event file or stack (acisf01927_000N001_evt1.fits): 
Output region file or stack (1927_evt1_L1a.fits): 
Observed grating type (header_value|HETG|HEG|MEG|LETG) (HETG|HEG|MEG|LETG|header_value|HEADER_VALUE) (header_value): 
Source A - x position of zero order (1:65536) (4170.59): 
Source A - y position of zero order (1:65536) (4123.34): 

The contents of the parameter file may be checked using plist tg_create_mask.

The mask file contains a circle for the source and two rotated boxes that define the grating arms. The source position matches that which we gave to tg_create_mask:

unix% dmlist 1927_evt1_L1a.fits"[cols shape,sky]" data
 
--------------------------------------------------------------------------------
Data for Table Block REGION
--------------------------------------------------------------------------------
 
Region Block: Circle(4170.59,4123.34,0)&Box(4097.52,4106.42,0,0)&Box(4095.7,4119.31,0,0)
ROW    SHAPE              SKY(X,Y)
 
     1 circle             (     4170.589843750,     4123.339843750)
     2 rotbox             (     4097.5239257812,     4106.417968750)
     3 rotbox             (     4095.6982421875,     4119.3105468750)

The mask region can also be overlaid on the event file:

unix% ds9 acisf01927_000N001_evt1.fits &

Then use Region-> Load Regions-> 1927_evt1_L1a.fits[REGION] to display the regions. Figure 4 [Link to Image 4: Mask overlaid on the event file] shows the result.



Creating a New Spectrum

Now that an accurate mask file exists, there will not be any issue with the source location in the rest of the spectral extraction process. From this point, continue with the grating analysis from the "Run tg_resolve_events" step of the HETG/ACIS-S or LETG/ACIS-S grating spectra thread.




Parameters for /home/username/cxcds_param/tg_create_mask.par


##
## TG_CREATE_MASK -- Calculates the mask regions of the grating arms
##    for AXAF flight L1 grating data files.  The output is a region
##    file(s) in sky coordinates.
##
        infile = acisf01927_000N001_evt1.fits Input event file or stack
       outfile = 1927_evt1_L1a.fits Output region file or stack
 input_pos_tab =                  Input table with zero order positions or stack
   grating_obs = header_value     Observed grating type (header_value|HETG|HEG|MEG|LETG)
     sA_zero_x = 4170.59          Source A - x position of zero order
     sA_zero_y = 4123.34          Source A - y position of zero order
     sB_zero_x = 1                Source B - x position of zero order
     sB_zero_y = 1                Source B - y position of zero order
     sC_zero_x = 1                Source C - x position of zero order
     sC_zero_y = 1                Source C - y position of zero order
     sD_zero_x = 1                Source D - x position of zero order
     sD_zero_y = 1                Source D - y position of zero order
     sE_zero_x = 1                Source E - x position of zero order
     sE_zero_y = 1                Source E - y position of zero order
     sF_zero_x = 1                Source F - x position of zero order
     sF_zero_y = 1                Source F - y position of zero order
     sG_zero_x = 1                Source G - x position of zero order
     sG_zero_y = 1                Source G - y position of zero order
     sH_zero_x = 1                Source H - x position of zero order
     sH_zero_y = 1                Source H - y position of zero order
     sI_zero_x = 1                Source I - x position of zero order
     sI_zero_y = 1                Source I - y position of zero order
     sJ_zero_x = 1                Source J - x position of zero order
     sJ_zero_y = 1                Source J - y position of zero order
(input_psf_tab = CALDB)           Calibration file with mirror psf vs off-axis angle
     (detector = header_value)    Detector type: ACIS | HRC-I | HRC-S | header_value
(radius_factor_zero = 50)              A scale factor which multiplies the app. calculation of the one-sigma zero order 
radius
(width_factor_hetg = 35)              A scale factor which multiplies the one-sigma width of the heg/meg mask in the cro
ss-dispersion direction
(width_factor_letg = 40)              A scale factor which multiplies the one-sigma width of the letg mask in the cross-
dispersion direction
(r_astig_max_hetg = 0.5600000000000001) Max grating r coord (deg, along the dispersion) for HETG astigmatism calc
(r_astig_max_letg = 1.1)             Max grating r coord (deg, along the dispersion) for LETG astigmatism calc
(r_mask_max_hetg = 0.992)           Max grating r coord (deg) for HETG mask (to support offset pointing)
(r_mask_max_letg = 2.1)             Max grating r coordinate (deg) for LETG mask (to support offset pointing)
# --------------------------------------------------------------------------
# The parameters below are to be set ONLY if the user wants to use their
# own grating mask sizes instead of having the masks automatically generated.
# Only ONE input file, with up to 10 soures, can be processed using the user 
# params.  @ lists of multiple files can only be done with automated mask
# processing, or by running each file individually with hand set mask sizes.
# To start, you MUST set the following parameters:
#
# > pset tg_create_mask use_user_pars=yes last_source_toread=[letter A -> J]
#
# The parameter last_source_toread should be set to the last source letter
# for which you will enter parameters.  If you want to input 2 sources 
# (regardless of their source id's), the last_source_toread=B. Sections
# A -> J are for (upto) 10 user specified sources.  In each sections, 
# each source must have an ID, a zero order center position specified, 
# as well as the grating mask width(s).  An example with 2 HETG sources, 
# with src_id's 6 and 3:
#
# > pset tg_create_mask use_user_pars=yes last_source_toread=B
# > pset tg_create_mask sA_id=6 sA_zero_x=4762.34 sA_zero_y=2344.29 
# > pset tg_create_mask sA_zero_rad=35 sA_width_heg=25 sA_width_meg=28
# > pset tg_create_mask sB_id=3 sB_zero_x=4063.54 sB_zero_y=6346.62 
# > pset tg_create_mask sB_zero_rad=45 sB_width_heg=50 sB_width_meg=75
#              (units are all in sky pixels)
#
# NOTE: for Continuous Clocking data (CC mode), the HETG mask does not
# require the s#_width_heg, since the meg mask will encompase the entire
# data set.  HEG event processing in CC mode is done using the next 
# tool tg_resolve_events.
# --------------------------------------------------------------------------
(use_user_pars = yes)             Use the user defined mask parameters below: yes or no?
(last_source_toread = A)               Last source name to be read; character A->J.
# --------------------------------------------------------------------------
#                       Source A parameters
# --------------------------------------------------------------------------
        (sA_id = 1)               Source A - source id number
  (sA_zero_rad = 50)              Source A - radius of zero order mask
 (sA_width_heg = 35)              Source A - width of heg mask in sky pixels
 (sA_width_meg = 35)              Source A - width of meg mask in sky pixels
 (sA_width_leg = )                Source A - width of leg mask in sky pixels
...
    

History

04 Apr 2006 new for CIAO 3.3: original version
01 Dec 2006 reviewed for CIAO 3.4: no changes

Return to Threads Page: Top | All | Grating
Hardcopy (PDF): A4 | Letter
Last modified: 1 Dec 2006


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.