next up previous contents
Next: Viewing the qpoe file. Up: AXAF Recipes Previous: Summary of tasks in

Reading fits files from the AXAF simulator, MARX

At the current time (1997 Dec), the only AXAF files of general interest are those produced by MARX via the MARX utility 'marx2fits' and 'marx2img'. Although the MARX fits files conform to FITS standards, there are two parameters in the events list fits header which are written as reals whereas fits2qp expects integer format. Therefore, we provide a script which fixes this incompatibility. Note that future versions of MARX software may include changes that will obviate the need for this work-around. The following description tells how to produce a qpoe file from the MARX fits file (events list format). We have tested the method only to the extent of examining the qpoe file with 'xexamine', xexamine_r, and rudimentary spectral functions like displaying PHA distributions. Note also that if you want only spatial information, one can run the MARX utility 'marx2img' which produces a fits file with a primary image only. This can be read by the general IRAF task dataio.rfits to produce an image file. 1) An event fits file is produced from MARX results by using the task 'marx2fits' 2) In IRAF, a PROS qpoe file can be created from this fits file. >ncl
>cd <your_working_directory>

> lpar marx2qpoe
inp_fits =            input fits filename
out_qpoe =            output qpoe filename
DetectorType = 1       Detector Type: (1)ASC-I (2)ASC-S (3)HRC-I (4)HRC-S
key_x = "chipx"         index key for x coordinate
key_y = "chipy"         index key for y coordinate
(axlen1 = 1024)         dimension of qpoe axis #1
(axlen2 = 1024)         dimension of qpoe axis #2
(display = 1)           display level
(clobber = no)         Okay to delete existing qpoe file?
(DeleteInterm = yes)         Okay to delete intermediate file?
(fits_cards = "xdataio$")      definitions for fits cards
(qpoe_cards = "xdataio$")      definitions for qpoe cards
(ext_cards = "xdataio$") definitions for ext cards
(wcs_cards = "xdataio$")      definitions for wcs cards
(qp_pagesize = 16384)       page size for qpoe file
(qp_bucketlen = 32767)       bucket length for qpoe file
(flpar = no)       flush pfile on assign?
(mode = "ql")
Note that besides choosing the proper detector, you must specify which coordinates to use. For MARX VERSION: 2.04, the only non-zero coordinates are chip coordinates (chipx, chipy) and tiled coordinates (tdetx, tdety). In the future, other options will include detx, dety, and x, y (i.e. actual focal plane coordinates).

At this stage, we suspect that most users will want to use the spatial coordinates, tdetx, tdety. If you want the chip coordinates, once you have the qpoe file, you will probably want to specify the file as filename.qp[ccdid=n] where 'n' is the chip ID, as per figure 2.2 in the MARX manual. Note that in our tests, the four chips of the ACIS I had to be rotated to recover the appearance of the source on the sky. This is because the chip coordinates orientation differs from instrument to instrument.

Instrument Axlen Key
ACIS-I 1024 chipx,chipy
  8192 tdetx,tdety
ACIS-S 1024 chipx,chipy
  6144x1024 tdetx,tdety
HRC-I 16384 chipx,chipy
HRC-S 16384x4096 chipx,chipy
  49152x4096 tdetx,tdety



Chipx and tdetx are the same, as are chipy and tdety. It appears that to recover the correct sky orientation, the image must be viewed from 'behind' with an additional rotation of 45 degrees. The choice of TDET for HRC was a request from the HRC instrument team. The problem is that we really need DETX, DETY (focal plane coords) and MARX doesn't calculate them yet. The 'back to front' is because HRC-I is wired up such that its native telemetry coordinate axes are a left handed system. For more details on coordinate systems, see: jcm/asc/coords/ then click on ... ASC Coordinate Systems, Version 4.2 memo Once the parameters are chosen, run: xp> marx2qpoe

next up previous contents
Next: Viewing the qpoe file. Up: AXAF Recipes Previous: Summary of tasks in