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


RXTE
GOF
Reduction and Analysis of PCA Event-Mode Data
Recipes from the RXTE Cook Book
RXTE
FAQ


Introduction

After a brief preamble on the nature of Event mode itself, this recipe outlines all the steps in producing and analyzing spectral data from the PCA Event modes. Where appropriate, links are provided to more detailed information, the aim here being to provide a check-list of all the things that need to done.


Event Modes

To begin with, it's worth repeating a statement from the recipe Reduction and Analysis of PCA Spectra: The only good reason to use a configuration other than Standard-2 for spectral analysis is to obtain temporal resolution better than the 16 seconds of Standard-2. Event modes do provide spectral information on shorter time scales, hence this recipe.

In brief, Event modes (e.g. E_62us_64M_0_1s_L1R1) differ from binned modes (e.g. Standard-2) in that:

  • Each row contains a single event rather than binned events.

  • The Time column contains the time the event occurred rather than the (regular) time the bin was accumulated.

  • The properties of each event are encoded in a binary event word, unlike the case for binned mode where properties are embodied in histograms.

Together, these differences are so profound that Event and Binned modes require separate extractors: saextrct for Binned modes, seextrct for Event modes. [Strictly, the distinction is not between Event and Binned modes, but between Science Event and Science Array formats.]


Reduction of Spectral Data

Here we sketch all the steps involved in producing the files needed by xspec, namely, source and background spectra and a response. To avoid confusing generalities, this example assumes that your observation is of an X-ray burster.

  1. Use XDF to find your Event-mode datafiles: Instructions can be found in the Getting Started Guide. For GoodXenon data, put both GoodXenon1_xx and GoodXenon2_xx in one file list. (See below for combining them.)

  2. Familiarize yourself with the properties of your configuration: By this, we mean verify the time resolution, the channel binning and whether the configuration has PCU ID and anode ID. The section EDS Configurations: Generic Event in the The ABC of XTE explains how.

  3. Use XDF to find the filter file: We recommend naming the XDF output file something like filter.xdf. Please note:

    • If the data you want to examine span more than one ObsId, then it's a good idea to merge the corresponding filter files. Use the ftool fmerge, making sure the input files are in increasing time order and adding lastkey=TSTOP to the command line. For more information, type "fhelp fmerge".

    • If you don't have a filter file, then generate one following the recipe Creating XTE Filter Files.

  4. Examine the filter file: The filter file tells you the status of the satellite and its instruments during your observation and can be used to identify periods of good data. To plot it, type "fplot offset=yes" followed by the name of the filter file. Enter "Time" as the x-axis. For the y-axes, it depends what in particular we want to see:

    • How many PCUs were on? Plot the columns:
         PCU0_ON
         PCU1_ON
         PCU2_ON
         PCU3_ON
         PCU4_ON
         NUM_PCU_ON
      
      Periods where the number of PCUs on is different should be reduced separately and combined later - see the recipe Combining 3-PCU, 4-PCU and 5-PCU Spectra for details.

      Another thing you can determine from the number of PCU on is when the SAA passages occur. At these times, all PCU are turned off, so NUM_PCU_ON goes to zero.

    • Where there any Earth occultations? Plot the column ELV. Here, zero is defined as pointing at the horizon, negative is looking at Earth, and positive is looking at the source. We recommend filtering out data where the elevation angle is less than 10 degrees. Some data sets have shown effects of bright Earth at ~5 degrees, so you should look at your data before including anything closer than 10.

    • Was the pointing stable? Plot the column OFFSET. This should vary quite regularly on scales of ~10^-3 degrees, and these minor variations will not affect your analysis. They are mainly due to the HEXTE rocking motion. Often, however, you will see steep spikes at the very beginning or end of a given observation; this is where some small amount of slew was included in the on source data file. These must be filtered out, and we recommend using OFFSET < 0.02 as the selection criterion.

    • Were there any SAA passages in your observation? Plot the TIME_SINCE_SAA column, which is a parameterization of coordinates relative to the SAA which approximately represents minutes since the peak of the last SAA passage. Since it is a coordinate parameterization, it will jump to negative values before the SAA, and in orbits where there is no SAA passage, it is defined to be 100. When TIME_SINCE_SAA is between zero and, for instance, 30 minutes, the background will increase dramatically, lowering your signal to noise. For faint sources, you may want to discard this data. See below.

    • Was there significant electron contamination? Plot the ELECTRONn columns. (For each PCU, these numbers should be effectively the same.) For analysis of faint sources, the PCA team recommends filtering out time when ELECTRON2 is larger than 0.1. See the PCA Digest page for more details on background performance and filtering.

    To list all the columns in a filter file, use the ftool flcol. For more information about plotting, please check the recipe Plotting with PLT.

    Note that all but the earliest RXTE data files have two extensions called GTI, the first of which contains the times when:

    1. Telemetred data are present

    2. The satellite is pointing at the nominal source position, as derived from the spacecraft attitude

    3. The nominal source position is not occulted by the Earth, as predicted by mission operations

    4. The satellite is outside the South Atlantic Anomaly, as predicted by mission operations

    The second GTI extension includes time when only the first of the above apply.

    These GTI are applied by answering "APPLY" to the seextrct prompt Input GTI files to be OR'd. Filtering with only the GTIOR file, however, is not usually sufficient, which is why we recommend making a GTIAND file using the selection criteria discussed above. Mainly, this is because the SAA passages may not occur exactly as predicted, nor do the Earth occults; in addition, the GTIOR's criterion for determining occults does not take into account possible bright Earth effects.

    To make your own GTI file to be AND'ed in the extractor, use the tool maketime. This tool will make a FITS GTI file from any FITS file with a time column and other columns from which to select. It will take either Fortran or C style. For example, to filter out occults and bright Earth, slews, and times where all PCU's are off during SAA and only three are on otherwise:

    
     olegacy [84] [day] ~: maketime
     Name of FITS file and [ext#][] FP_3c7a9f5-3c855c1.xfl
     Name of output FITS file[] basic.gti
     Selection Expression[] elv.gt.10.and.offset.lt.0.02.and.num_pcu_on.eq.3
     Column containing HK parameter names[NAME]
     Column containing HK parameter values[VALUE]
     Column containing HK parameter times[TIME] 
     Flag, yes if HK format is compact[yes] no
    

    Note that the tool is case insensitive with regard to column names and that the last input must be changed from the default 'yes' to 'no' for XTE data. This file can then be put into either saextrct or seextrct as the GTI file to be AND'ed.

    For analysis of faint sources, we recommend the additional expressions (TIME_SINCE_SAA > 30 || TIME_SINCE_SAA < 0.0) && ELECTRON2 < 0.1, which will filter out data within thirty minutes of the peak of SAA and that with high electron contamination.

  5. Convert GoodXenon1&2 into FITS: For GoodXenon event data, the events are split between two EA's and telemetered in two separate files, GoodXenon1 and GoodXenon2. (For more information, see the ABC Guide's chapter about GoodXenon mode.) These two files must be combined to form the FITS event list using the script make_se, a script which calls the ftool xenon2fits. Simply give the script the list of both GoodXenon1_xx and GoodXenon2_xx files obtained from XDF, and it will match and combine them. It will ask you for a root file name, and it will produced numbered output files by appending "_gxn". If you make another ASCII list of these files, that list can be used in the following steps.

  6. Create a bitmask: You'll need to apply a bitmask to strip out certain EDS housekeeping flags also known as clock events. This has to be done for all Event modes, except for Good Xenon and HEXTE Event modes. The bitmask is also where you make any PCU or anode selections. The recipe Selecting PCA Data by PCU, Layer and Anode explains how.

    In this example, we'll assume that plotting the filter file revealed that PCU4 was off during some of the observation and that our configuration allows us to select only those PCUs (0-3) that were on all the time. So we need a bitmask which will strip out all of the PCU4 events; we may be able to apply it directly in the extractor, or we may have to fselect first. (See recipe.)

  7. Extract a light curve: To verify that you've removed all the bad data and to identify parts of the light curve that you might want to focus on - the peak of the burst, say - extract a light curve with seextrct, as described in the ABC Guide. Input event.xdf and your GTI file (at the prompt Input GTI file to be AND'd with INFILE).

    Plot your light curve with "fplot offset=yes", entering TIME as the x-axis and RATE[ERROR] as the y-axis. Looking at the plot:

    • Check whether there are any suspicious looking spikes or drop-outs indicative of bad data. These are usually found at the extrema of sections of good data.

    • Note down the start and stop times of the parts of the light curve you want a spectrum from, avoiding any bad data. In our example, we'll be isolating the peak of the burst and a stretch of pre-burst emission.

    Then run timetrans to generate time filters. Here, we'll call then peak.tint and preburst.tint.

  8. Extract spectra: Rerun seextrct to extract the PHA files, this time applying your time filters at the prompt Input time intervals t1-t2, t3-t4 in seconds. In our example, we'll produce the PHA files:
       peak_0123.pha   preburst_0123.pha
    

  9. Correct for deadtime: Deadtime exceeds 1 percent when the count rate per PCU exceeds 1000 counts per second. To correct for deadtime, please consult the recipe PCA Deadtime.

  10. Create background datafiles:This is a fast-changing topic. The program "pcabackest" is used to create pca background files for your data, based on models formulated by the PCA team. Please check the PCA Digest page for the latest information on which background models to use, and follow the recipe for Running Pcabackest to apply those models and create appropriate PCA backgrounds for your data.

    In general, you run a Perl script, runpcabackest, to drive pcabackest to produce a set of datafiles that match your Standard-2 files but contain synthesized background data. But please note:

    • Regardless of mode or configuration, pcabackest always operates on Standard-2 data and always outputs files that resemble Standard-2 data.

    • Do not choose all the default options in pcabackest. When making background for use with configurations other than Standard-2, pay to attention to how the pcabackest output should be binned and to whether the PCU gain alignment should be applied. See the final section of the recipe Reduction and Analysis of PCA Spectra.

  11. Extract background spectra: Here, you have to remember that your pcabackest data from which you'll extract a background spectra are in science array format requiring saextrct not seextrct. You can still use the same .gti and .tint files, but if you want to extract data from, say, PCUs 0-3 you should create the corresponding column selection file. The recipe Reduction and Analysis of PCA Spectra explains how.

  12. Create response matrices: PCA response matrices should match the PHA in epoch (to ensure that the high-voltage setting is the same), and in PCU and anode. Follow the recipe Creating PCA Responses to make responses corresponding to the column-selection files used. For our example, we'd use pcarsp to create:
       pcus0123_961029.rsp
    
    Note that pcarsp will automatically apply the PCU gain alignment to the response at this point.


Spectral Analysis

Spectral analysis of Event-mode spectra with xspec is not fundamentally different from spectral analysis of Standard-2, as described in the recipe Reduction and Analysis of PCA Spectra. Note, however, that the PCU gain alignment results in folded models that look more ragged than you'd expect from noise. This is just an artifact.


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 Wednesday, 24-Aug-2022 11:10:30 EDT.