RXTE GOF |
Using fasebin to Create Phase-Binned Spectra and
Histograms Recipes from the RXTE Cook Book |
RXTE FAQ |
---|
- Introduction
- Data files you will need
- Running fasebin
- Combining fasebin files from different Orbit days
- Analyzing fasebin spectra in xspec
- Subtracting persistent emission
- Combining several phase bins into one
- Creating a counts-per-phase-bin histogram
The recommended tool for producing phase-binned spectra is fasebin.
Fasebin handles the extraction, barycenter correction, and phase-binning
of input RXTE data, eliminating the need to run separate tools for
these various functions. It produces a single FITS file in the OGIP
Type 2 spectral format: each row in the output file is a separate
spectrum associated with a given phase bin. Other tools in the fasebin
suite can then be used to subtract persistent emission (fbsub), combine
phase-bins (fbfsum), and produce a "counts-per-phase-bin" histogram
(fbssum). Examples of each will be shown below.
To run fasebin you will need to have the following:
Run make_se on your data files, to produce full binary FITS files
from the Good_Xenon1 and Good_Xenon2 raw data files. Make an
ascii list of these new files, and treat this as your list of
PCA data files in all future steps.
$LHEA_DATA/psrtime.dat
(This directory and file are created automatically when FTOOLS is
installed on your system.)
This file contains a recent copy of the Princeton Radio Pulsar database.
If your source is in this file with the correct epoch and period, you
may skip steps #4 and 5, and go directly to step 6.
(Obviously, if your source is not a radio pulsar it will not be in this file;
proceed directly to step #4.)
setenv TIMING_DIR /full/path/name/fasebin_files
where "/full/path/name/fasebin_files" is the full UNIX path name
of the directory you just created.
cp $LHEA_DATA/psrtime.dat $TIMING_DIR/psrtime.dat
edit $TIMING_DIR/psrtime.dat
$LHEA_DATA/psrbin.dat
This is the binary orbits table for the Princeton Radio Pulsar Database.
If your source is listed (under "PSR B" column), proceed to
step 7. If not, create a $TIMING_DIR as in step #4
(unless you have already done so), and follow steps #4 and #5
for file "psrbin.dat". Place
the appropriate binary orbit information in your copy of the psrbin.dat
file instead of the pulsar period information listed in step #5.
(See "fhelp fasebin" for more information on the data columns in the
Princeton Radio Pulsar Database binary tables.)
To combine data of the same source and configuration taken over
multiple Orbit days:
Phase-binned spectral files from any of the fasebin tools may be read
directly into xspec 10.0 or higher. (Earlier versions of XSPEC
do not support OGIP Type 2 Spectral FITS files.) The syntax for reading
Type 2 spectral files in xspec is:
This will read the 10th spectrum (ie., the tenth row) of your
phase-binned .pha file; to display more than one spectrum at a
time, use the "data 1", "data 2" syntax in xspec
(see the xspec manual for details).
To produce a response matrix, DO NOT give your
phase-binned spectral file to pcarsp. Instead, extract a normal,
un-phase-binned spectrum for the same type of data you gave fasebin
(eg., if you ran fasebin on PCA binned mode data, run saextrct
on some part of the same binned data and produce a spectrum). Give this
un-phase-binned spectrum to pcarsp and make a response matrix from
this. Since you are using the same data that you gave to fasebin,
the response matrix will be valid for the fasebin spectral file as well.
(Good Xenon users only: keep in mind that fasebin, by
default, extracts only layer 1. If you used this default behavior, make
sure you specify layer 1 only (LR1) when you run pcarsp.)
You may subtract the persistent emission (the baseline background)
from your data in one easy step, with the FTOOL fbsub:
The phase minimum and phase maximum may contain any continuous range
of phase space which you feel best represents the unpulsed component
for your source. The entire phase range (0.0 to 1.0) may be used
in most cases as a good first approximation, since the few phase bins
containing the pulsed emission will not effect the baseline much.
You may also enter a second phase range to be used in calculating the
unpulsed background -- see "fhelp fbsub" for details.
You may combine contiguous phase bins into a single spectrum
using the FTOOL fbsum:
This will create a Type 2 spectral file with a single row representing
the combined spectrum for phase bins 5-8. If the last input (number
of phase bins) was changed from "4" to "2", the output file would
contain two spectra, one for phase bins 5+6, the other for bins 7+8.
Leaving out the "binstart=5 binstop=8" parameters on the command
line would combine every 4 phase bins in the input file into a single
spectrum in the output, resulting in an output file with 5 separate
spectra. (The input file contains 20 phase bins.)
To produce a histogram of counts-per-phase-bin, use the FTOOL
fbssum:
This will sum the counts in all channels for each phase bin, and
dump the resulting totals to the screen. Header-style comments
at the top of the output define the columns and units, as well as
echoing the included channels. You may cut and paste the entire
output to a file and plot with any ascii plotting package (eg.,
QDP, gnuplot, etc.).
Please Note: the resultant histogram covers two full phase
cycles, ie., 0.0 to 2.0 in phase space. Thus, if you requested
N phased bins when running fasebin, you will have 2N+1 phase bins
in your output.
For the syntax on creating histograms for restricted channel ranges,
see "fhelp fbssum". BEWARE: the channels are relative
to the configuration used, NOT THE ABSOLUTE 0 to 256 CHANNEL RANGE
OF THE PCA INSTRUMENT. See the fhelp for further details.
Introduction
Data files you will need
Running fasebin
Combining fasebin files from different Orbit days
ls day*.pha > alldays_pha.list
more alldays_pha.list
day1107.pha
day1108.pha
day1112.pha
fbadd
Input File (or @filelist)[] @alldays_pha.list
Name of output .pha file[fBadd.pha] alldays.pha
Analyzing fasebin spectra in xspec
XSPEC> data alldays.pha{10}
Subtracting persistent emission
fbsub
Input File[] alldays.pha
Name of output .pha file[fBsub.pha] alldays_pulsed-only.pha
Phase minimum[0.0]
Phase maximum[1.0]
Combining several phase bins into one
fbfsum binstart=5 binstop=8
Input File[] alldays.pha
Name of output .pha file[fBfsum.pha] alldays_phase5-8.pha
Number of phase bins (rows) to be averaged[5] 4
Creating a counts-per-phase-bin histogram
fbssum
Input File[] alldays.pha
Channels for energy ranges[]
If you have a question about RXTE, please send email to one of our
help desks.