Grating data analysis

The following procedure is provided by V. Gupta:

  1. Derive a pha2.fits file and the arf files using CIAO Science Threads.
  2. The level=2 file provided by CXC (or the default recipe provided by CXC to create a level=2 file from level=1) keeps the pixel randomization ON. Pixel randomization is done while creating the level=1.5 file from the level=1.0 using tg_resolve_events.
    In order to create the level=1.5 file with pixel randomization off, one can use:
    pset tg_resolve_events rand_pix_size = 0.0
    For details, go to the CXC page here.

    Use
    ahelp tg_resolve_events
    or
    ahelp tgextract
    to look for the detailed descriptions of the parameters. Following recipe assumes that the gratings spectrum has been extracted with the default values.
    Note 1: The pha2 file for the HETG grating consists of information about spectrum of different orders for HEG and MEG. Each row corresponds to photons of different orders. The background counts correspond to the rectangular area above(background_up) and below (background_down) the dispersed spectrum.
    Note 2: In case your file is processed with an ASCDSVER lower than R4CU5UPD13, you would require to update the header keywords: BACKSCAL, BACKSCUP, BACKSCDN.
    BACKSCUP and BACKSCDN indicate the ratio of the area of the background and the source extraction regions and should always be numbers >1. (Info from CXC available here!)

  3. Create an ASCII file from pha2.fits with four columns: wavelength, source_counts, background_counts, effective area.

  4. This can be done with an IDL script.
    Note 1: In the pha2.fits file: Note 2. Read the exposure time from the header of the pha2 file.

  5. Rebin the data and create an ASCII table with three columns: wavelength, background subtracted flux, and errors.
The resulting spectrum can then be analysed using Sherpa walkthrough examples for ASCII files.

K. Lewis provides a conveniently reformatted Web-based listing of X-ray line identifications based on data provided by the HEASARC at GSFC (note: Opens in new window).