RXTE Helpdesk/FAQ RXTE What's New HEASARC Site Map

Creating PCA Responses
Recipes from the RXTE Cook Book

Important Update for FTOOLS 5.2!

The release of FTOOLS version 5.2 analysis software includes improvements in PCA calibration tools. New versions of PCARMF, XPCAARF, and the wrapper script PCARSP are available, along with a new energy-to-channel FITS file pca_e2c_e05v02.fits. The default values in XPCAARF (in xpcaarf.par) for the geometric areas of four of the five PCUs have changed (PCU 2 was left unchanged). These were chosen to make the flux of the Crab similar when fit to the five detectors (epoch 3/4 chosen for the comparison). Note that this will likely result in a step function in monitoring fluxes unless the whole data set is reanalyzed with a constant set of XPCAARF coefficients.

Please see the PCA Digest page for more information, and timely updates on response, background, and other data analysis issues.

Introduction & Preliminary Definitions

Following OGIP convention, PCA response matrices are notionally divided in two parts: the Ancillary Response File (ARF), which accounts for the detector windows and collimator response; and the Redistribution Matrix Function (RMF), which accounts for the redistribution of photon energy amongst detector channels by the detecting medium. The product of the two is known as the response (RSP) and is used by xspec for spectral analysis.

In the case of the PCA, the response depends primarily on four things:

  1. Gain setting: The overall gain setting of the PCA has been changed twice since launch for operational reasons. These changes are significant: data from more than one gain epoch should not be analyzed spectrally with the same response. [Pcarsp, though the caldb, automatically identifies and applies the correct gain epoch. However, it cannot automatically sense from which PCUs a given PHA file was generated.]

  2. PCU ID: The individual PCU have slightly different gains. Moreover, not all PCU may be on when the data were collected. It's important, therefore, to match the detector IDs of the response with those of the data. [Pcarsp, though the caldb and the ftool pcagainset, automatically applies the EDS gain corrections for those configurations that require them, i.e. all except Standard-1, Standard-2 and Good Xenon.]

  3. Anode ID: To boost signal-to-noise, spectra are often extracted from just the top layer (anodes X1L, X1R). The anodes included in the response should match those of the data.

  4. Channel binning: Although the response does not in fact depend on how it's binned, xspec requires that the binning of the response and PHA files (source and background) should be identical.
Given these variables, it's more effective to supply users with a response-generating program than to make available a large set of response matrices covering all the combinations. This program - a Perl script, in fact - is called pcarsp. Based on user input and the contents of the PHA file, it creates the appropriate ARF and RMF files and combines them to produce the RSP. How to run it is described below.

Running Pcarsp to Make a Response

Before running pcarsp, you should have caldb installed on your system.

Attention GO's with an offset pointing!!! In the special case of a requested offset pointing, you will need to modify the keywords in the header BEFORE running PCARSP. The keywords RA_OBJ and DEC_OBJ contain the coordinates of the pointing requested. These should be changed to the SOURCE coordinates using FMODHEAD as in the following example:

1) Create at ASCII file, containing the RA and Dec of the source coordinates, for example:

        RA_OBJ 266.137909
        DEC_OBJ -28.741100
We'll call this file position.

2) Run FMODHEAD to replace the current values of RA_OBJ and DEC_OBJ in the header of your .pha file:

        fmodhead MYFILE.pha position

Changing these keywords to reflect the source coordinates ensures that when you generate a response matrix, the collimator correction will be calculated correctly based on where the source falls on the detector. Important: In this case you MUST supply an attitude file.
  1. Type "pcarsp" to invoke the script.

  2. Specify the name of the PHA file. When it's finished, pcarsp will write into the header of the PHA file the name of the response it has just generated. This means you won't have to use the "response" command in xspec to load in the response.

  3. Specify the name of the file containing the attitude information. To compute the collimator response correctly, pcarsp needs attitude information. It can be found either in your filter file or in the estimated quaternion file (the file beginning with "FH0e_").

    If you don't have the attitude information and are confident that the source was in the centre of the field of view, you can enter "NONE".

  4. Specify the anodes from which the PHA data were extracted. You should already know this information since you had to specify PCUs and anodes when you extracted the PHA file with saextrct or seextrct.

  5. Specify whether the anodes have been combined during extraction - usually the case. If you answer "no", you'll get a set of responses for each anode specified.

    (Note: "LR1" means left and right anodes of layer 1 added together, which is equivalent to saying "L1,R1" and at the next prompt, saying "yes" to add the responses.)

  6. Specify the PCUs from which the PHA data were extracted. You should already know this information since you had to specify PCUs and anodes when you extracted the PHA file with saextrct or seextrct.

  7. Specify whether the PCUs have been combined during extraction - usually the case. If you answer "no", you'll get a set of responses for each detector specified.

After answering these questions (and one about whether to pause after creating each individual response), pcarsp will generate the RSP file.

If you have a question about RXTE, please send email to one of our help desks.

This page is maintained by the RXTE GOF and was last modified on Thursday, 11-Oct-2007 14:42:54 EDT.