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


RXTE
GOF
Light Curves, Hardness Ratios and Color-Color Diagrams
Recipes from the RXTE Cook Book
RXTE
FAQ


Preliminary Assumptions

This recipe assumes you would like to construct several light curves in different energy bands from Standard-2 data (or any other Binned mode with sufficient spectral resolution to allow this), and use them to construct figures of hardness ratios against time, hardness-intensity (hereafter HI) plots, and color-color (hereafter CC) diagrams.

You can handle Event mode in exactly the same way, but using seextrct instead of saextrct to create your light curves - see the ABC guide and the relevant Event mode recipes for further information.


How to Create and Plot Light Curves, Hardness Ratios and Color-Color Diagrams

  1. Create the necessary GTI files (or determine the necessary selection times by other means) to exclude Earth occultations and any other "undesirable data" intervals. Incorporate this into your saextrct runs hereafter.

  2. Choose energy ranges of interest. Let's assume that we want to examine three ranges: 1-5 keV, 5-8 keV, and 8-20 keV, for eventual construction of a CC diagram.

  3. Determine which channels these correspond to:

    We have prepared an Energy-Channel Conversion Table which makes this step a simple matter of looking it up; you only need to know the gain epoch in which your data were taken. The following is a description of how to find this conversion yourself.

    1. One way of doing this (by reading a Standard-2 spectrum into xspec, excluding energies outside your desired range, and looking to see what bin numbers remain) is described in the Extracting Light Curves and Spectra chapter of the online ABC Guide.

    2. Another way is to run fdump on the Standard-2 response matrix, and look to see which channels correspond to the values of E_MIN and E_MAX (minimum and maximum energy) you're interested in.

    Using either of the above methods, we find that for Standard-2 data in the third gain epoch, the energy ranges of interest correspond to "binned channels" 0-10, 11-18 and 19-51.

    We then use chantrans to convert from "binned channels" to "original channels" - Standard-2 data is binned into 129 channels from the original 256-channel binning, and saextrct needs to know the channel selections in original channels.

    
    prompt > chantrans
    Input file name or @file-of-filenames: std2.pha
    Output filename:[] channels.txt
    Input relative channel range:[0-5, 16, 22-128]0-10,11-18,19-51
    
    and learn that these correspond to original channels: 0-14, 15-22, 23-57.

  4. Run saextrct once for each light curve you wish to create, with all parameters set the same in each except for the channel selection. Although not obligatory, it's a good idea to include information about which channels have been selected in the filename itself, e.g. in saextrct:
    
    Root name for output file: x1820obs1_0_14
    
    To apply a channel selection, you can enter the chosen channels at the saextrct prompt:
    
    Input channels to be retained 1-2,3-4 (INDEF): 0-14
    
    Alternatively, you could enter the lowest bin to be included at the Minimum energy bin to include in Spectra prompt, and the highest bin at the Maximum energy bin to include in Spectra prompt. Don't be fooled by the word "Spectra" in this prompt: this is a minor typo that we'll fix in the next release.

    A full explanation of other saextrct input parameters can be found in the ABC guide.

    You have now run saextrct three times and created three light curves (and three spectra) with names like:

    
    x1820obs1_0_14.lc (.pha),
    x1820obs1_15_22.lc (.pha), and 
    x1820obs1_23_57.lc (.pha). 
    
    If you want to utilize background-subtracted light curves (and well you might), note that background subtraction is covered extensively in the PCA Background Subtraction recipe, and we do not repeat this here. For weaker sources, you'll want to take care to subtract background before creating HI and CC plots: here, for simplicity, I assume your source is bright enough that the background is negligible.

    In turn we now plot:

    1. A - one of the light curves (countrate versus time);
    2. B - an HI plot (hardness versus count rate);
    3. C - a hardness ratio plotted against time;
    4. D - a CC plot (hard color versus soft color)

  5. A - To plot a light curve, we use xronos' lcurve ftool:
    
    prompt> lcurve
    Number of time series for this task: 1
    Ser. 1 filename: x1820obs1_0_14.lc
    Name of window file: -
    
    [If you get a message saying that the defaults_win.wi file is not found, this means you don't have the xronos XRDEFAULTS environment variable set correctly. You'll need to set it by issuing a command like:
    
    setenv XRDEFAULTS '/ftools/SUN/develop/xronos/defaults/' 
    
    with the path correctly set for your ftools installation - and then run lcurve again. Be careful: the last / is important.]
    
    Newbin Time or negative rebinning: 64.0
    
    [or whatever time resolution you'd like for the plot. Note that this number must be supplied in seconds.]
    
    Number of Newbins/Interval: 300
    
    [Assuming you want the whole lightcurve on a single plot rather than spread out over several plots, make sure the number you enter here is larger than the Maximum Newbin No. given a couple of lines above the prompt.]
    
    Name of output file: 
    
    [Take the default, or give it anything you like - for a simple light curve plot we don't really care about this.]
    
    Do you want to plot your results?: Yes
    Enter PGPLOT device [/XW] 
    
    And the plot will appear.

  6. B - To plot a hardness/intensity diagram in xronos, use lcurve (again).
    
    Number of time series for this task[]: 2
    Ser. 1 filename: x1820obs1_0_14.lc
    Ser. 2 filename: x1820obs1_15_22.lc
    
    [Note: make sure you give the lowest-energy file first.]
    
    Window file: -
    Newbin Time or negative rebinning: 64.0
    
    [or whatever time resolution you'd like for the plot. Note that this number must be supplied in seconds.]
    
    Number of Newbins/Interval: 300
    
    [Assuming you want the whole diagram on a single plot rather than spread out over several plots, make sure the number you enter here is larger than the "Maximum Newbin No." given a couple of lines above the prompt.]
    
    Name of output file: x1820obs1_hid
    Do you want to plot your results?: Yes
    Enter PGPLOT device [/XW] 
    Hardness [1] or Light Curves: 1
    
    And the plot will appear. After you quit out of plotting, the data will be written to the FITS file x1820obs1_hid.flc.

    To subsequently plot the data in x1820obs1_hid.flc, you will have to supply the following inputs to the ftool fplot:

    
     > fplot x1820obs1_hid.flc
    Name of X Axis Parameter[error]: SUM12[SUM_E]
    Name of Y Axis Parameter[error] up to 8 allowed[]: RATIO_12[RAT_E12]
    Lists of rows[-] 
    Device: /XWindow, /XTerm, /TK, /PS, etc[/XW] 
    Any legal PLT command[] 
    
    [Note that the above does not contain a typo -- the columns in the file really do have the inconsistent naming convention RATIO_12 and SUM12 - this is a bug in lcurve.]

  7. C - To plot a hardness ratio against time in xronos, use lcurve exactly as above, creating the output file x1820obs1_hid.flc. Then:
    
     > fplot x1820obs1_hid.flc
    Name of X Axis Parameter[error]: TIME[XAX_E]
    Name of Y Axis Parameter[error] up to 8 allowed[]: RATIO_12[RAT_E12]
    Lists of rows[-] 
    Device: /XWindow, /XTerm, /TK, /PS, etc[/XW] 
    Any legal PLT command[] 
    

  8. D - To plot a color-color diagram in xronos, use lcurve (again):
    
    Number of time series for this task[]: 3
    Ser. 1 filename: x1820obs1_0_14.lc
    Ser. 2 filename: x1820obs1_15_22.lc
    Ser. 3 filename: x1820obs1_23_57.lc
    
    [Note: make sure you give the files in the order lowest-energy through highest-energy]
    
    Window file: -
    Newbin Time or negative rebinning: 64.0
    
    [or whatever time resolution you'd like for the plot. Note that this number must be supplied in seconds.]
    
    Number of Newbins/Interval: 300
    
    [Assuming you want the whole diagram on a single plot rather than spread out over several plots, make sure the number you enter here is larger than the Maximum Newbin No. given a couple of lines above the prompt.]
    
    Name of output file: x1820obs1_coco
    Do you want to plot your results?: Yes
    Enter PGPLOT device [/XW] 
    Colour-Colour [1] or Light Curves: 1
    
    And the plot will appear. After you quit out of plotting, the data will be written to the FITS file x1820obs1_coco.flc.

    To subsequently plot the data in x1820obs1_coco.flc, you will have to supply the following inputs to fplot:

    
    > fplot x1820obs1_coco.flc
    Name of X Axis Parameter[error]: RATIO_12[RAT_E12]
    Name of Y Axis Parameter[error] up to 8 allowed[]: RATIO23[RAT_E23]
    Lists of rows[-] 
    Device: /XWindow, /XTerm, /TK, /PS, etc[/XW] 
    Any legal PLT command[] 
    
    [Note that the above does not contain a typo -- the ratios in the file really do have the inconsistent column names RATIO23 and RATIO_12 - this is a bug in lcurve.]


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.