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


RXTE
GOF
Reduction of PCA Standard Mode 2 Data using XSELECT
Recipes from the RXTE Cook Book
RXTE
FAQ

This recipe describes how to use the latest release version of XSELECT to analyze PCA Standard Mode 2 data. It assumes some basic familiarity with RXTE data analysis and terms.


Introductory notes

XSELECT is a command-line interface to the FTOOLS for X-ray astrophysical analysis. Much used for ASCA and ROSAT analysis, the XSELECT program has recently been upgraded with a new mission database structure which now makes it possible to include support for RXTE data analysis. The current version of the program supports the reduction of PCA Standard Mode 2 data. If resources allow, PCA Good Xenon data analysis may be added. Given the complexity of possible RXTE configurations and the structure of XSELECT, it is unlikely that more advanced modes will be incorporated.

Using XSELECT, the user can:

  1. Organize the input of science data through the observation catalogue, and store it internally for easy use;

  2. Enter intensity, phase, spectral, and timing filters, which can be applied to the science data;

  3. Make good time intervals (GTI) by examining the light curves and spectra by eye, applying selection criteria to the XTE Filter (housekeeping plus auxilliary collected and derived quantities) data, or applying selection criteria to the light curve data themselves; and

  4. Extract, plot and save light curves and spectra accumulated from the science data, taking these filters and GTI tables into account.

Creation of XTE Filter Files and background files must still be done outside XSELECT, using XTEFILT and (RUN)PCABACKEST as described in the recipes indicated.

The following recipe provides a starting point for the analysis of RXTE data using XSELECT. A complete guide to XSELECT (aimed more towards ASCA and ROSAT data analysis, but including a great deal of useful information about filtering, etc) may be found here.

In this recipe, a single indented right arrow '>' implies that the input is supplied in subsequent lines, in response to further prompts by XSELECT. To keep the recipe uncluttered, the full text of the prompt is not given.

NB: To XSELECT, all science data known as 'event data', even XTE Science Array files. Don't be confused by this.


Finding and choosing data using XSELECT

Before you run XSELECT:

  1. Set up a working directory, and move to that directory;

  2. Create an XTE Filter File using XTEFILT;

  3. Create a list of Std2 files using XDF, if this is your preferred tool for RXTE data selection. (An alternative method of data selection is contained within XSELECT.)

Now you're ready to to fire up XSELECT in your working directory. All subsequent commands should be typed in response to the usual XSELECT prompt.

  • Set up XSELECT for XTE:
    	set mission xte 
    
    (it won't recognize 'rxte')
    	set inst pca
    

  • Point at data of interest. EITHER use XDF outside XSELECT to create a .xdf file, and then do the following within XSELECT:
    	read events "std2.xdf"
    

    The code will next ask you for a data directory. However, if you're using an XDF file containing the complete paths of the datafiles, XSELECT will override this data directory and use the XDF information to find the files. You may want to set the data directory to your current working directory if you're going to be working with background data later on that is in this directory (see below).

    OR use the obscat command internal to XSELECT. Reset the data directory to the top level of the directory structure that contains the FMI file and make an observation catalogue as follows:

            set datadir
    		>  /data/kaah5/xtegof/alan/FD/AO2/P20066
    	make obscat
    		>  DATAMODE .eq. 'Standard2f'
    

    (don't choose 'default' or 'none' for the filter - you won't like the result.)

    Note that the 'make obscat' command will find all data files in the directory tree below the data directory set. This may take a little while for a very large directory. XSELECT hunts for XTE Filter Files in the same way.

  • Whichever route you've gone, you now Choose data files within this dataset:
    	choose "1-2,12-15,17-18"
    

    (the quotes are necessary if you're supplying more than one range)

  • Set binsize for light curve:
    	set binsize 16.0
    	show status
    
    ('show binsize' doesn't work)

  • Extract and examine a spectrum and light curve (all detectors, all energies):

    	extract all
    
    ('all' in this case being a curve and a spectrum, though you can extract either one or the other by typing 'extract curve' or 'extract spectrum'.)
    	plot curve
    	plot spectrum
    
  • Once you're satisfied with your spectrum and/or light curve and want to save them for further analysis using e.g. XSPEC or XRONOS, you should save them with the commands
    	save curve
    	save spectrum
    
    More on this below


Basic data filtering

    Detector filtering is currently implemented as follows:

    	filter detector {DLA}
    
    where D = detector (0-4), L is layer (1-3), A is anode side (L,R), and wild cards are allowed, e.g. *1* means use layer 1 for all PCUs, and to select all detectors and layers, choose '***'. Use double quotes to enter the DLA on the command line.

    Thus, to select detectors 0-2, all layers, type:

    	filter detector "0** 1** 2**"
    	show filters
    

  • To filter by time, choosing good times by reading values off the X-axis of a light curve:
            plot curve
    	filter time scc
    	        > (quit out of PLT)
    		> i 5000.0,6000.0
    		> i 15000.0,16000.0
    		> x
    	extract curve
    	plot curve
    
    Note that SCC stands for SpaceCraft Clock. There are other ways of filtering data by time, including using the cursor on your plot or supplying the times within a file. Please see the help information on 'filter time' within XSELECT for complete details.

  • To filter by channel:
    	filter pha_cut
    	       > 5
    	       > 24
    	extract all
    

    These are original (raw) channels. Multiple pha_cut filters may be specified.

  • To filter by light curve intensity, plot a light curve, select the intensity slice of interest, and then:

    	filter intensity
    		>  150.0-170.0
    	extract curve
    	plot curve
    

Selection using the XTE Filter File

In XSELECT nomenclature, the XTE Filter File is an 'MKF' file (because this is what ASCA calls it). The code will, however, correctly identify a file with a .xfl suffix as a filter file. You'll have to make the filter file outside of XSELECT, but you can use this file within the program. (Note that XSELECT will default to looking for filter file information in the DATADIR directory tree - which is, of course, often the right answer - unless you explicitly set the MKFDIR to point at your working directory, as in the example below.)

To plot values in an existing XTE Filter File, use 'mkfbin', then 'plot mkf'. To select good time based on the values in the Filter File, use 'select mkf' followed by 'extract', as follows:

        set mkfdir /data/kaah5/xtegof/alan/X1323_New
	mkfbin "NUM_PCU_ON ELV BKGD_THETA"
		>  16.0
	plot mkf
	select mkf "ELV .gt. 5.0 .AND. NUM_PCU_ON .gt. 3"
	extract curve	

Background subtraction

Create your background datafiles outside of XSELECT, using (RUN)PCABACKEST in your current working directory. You'll end up with an ASCII list of background files, e.g. bg_00.files. Your goal is to swap back and forth between analyzing source data and background data, so you can use the same selection criteria for both, but this requires some sleight of hand since the data live in different places.

Let's assume you've been doing some work on the source data as described above. You now want to switch to your background files, and you'll need to change directories to your working directory in order to see them, if you haven't done so already:

	
	set datadir
		>  /data/kaah5/xtegof/alan/X1323_New/Xsel.test
(or appropriate directory name). At this point a 'make obscat' will automatically find all the background files (and everything else in this directory and directories beneath that looks like an XTE data file!), or you can use the filename created by RUNPCABACKEST, as follows:
	read events "bg_00.files"
	choose "1-2,12-15,17-18"
You will (may) be asked if you wish to 'clear filters?', and your answer will probably be "No" if you want to keep your previous filtering in place for the background.

Then proceed with data extraction and examination as above. When you're ready to go back to the source datafiles, return by simply reading back in the .xdf file, or re-setting the datadir and remaking the obscat, as described earlier.

NOTE that the obscat of the background files will look very similar to the obscat of the source-data files, because the keyword values it reads are largely identical in both. The difference is in the HDUCLAS2 column, which reads 'TOTAL' for source data, and 'BACKGROUND' for background data.


Other bells and whistles

XSELECT is a mature program that has been in use for many years to analyze data from e.g. ASCA and ROSAT. If you want to do something straightforward like clear or manipulate a filter, display data in a different way etc, odds are that XSELECT probably already does it. Look in the online help or the manual for more details. For example, to clear filters, use commands such as

 
        clear detector
        clear time

You can also write simple scripts to run XSELECT in batch, once you gain some experience with the program.


After using XSELECT

Once you've used XSELECT to create source and background spectra, source and background light curves, etc, you will probably want to do further analysis. Before undertaking spectral analysis, you'll need to create a response matrix for your spectrum using the PCARSP tool.

If you're new to X-ray data analysis, you'll want to study the online information about the XSPEC and XRONOS packages, for spectral and timing analysis respectively.

For further information about RXTE data and the FTOOLS suite available for their analysis, please see the extensive userguides on our data analysis pages, including our Getting Started Guide, the complete guide to RXTE data in The ABC of XTE, and especially the recipes in the RXTE Cook Book.


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:31 EDT.