.help fbssum Mar97 ftools.xte
.ih
NAME
fbssum -- Allows averaging of fB files in energy and performs phase analysis.
.ih
USAGE
.nf
fbssum infile chanbins hratio startphase endphase threshold
.fi
.ih
DESCRIPTION
This tool performs phase analysis in specified energy ranges.  The results
are printed out on the terminal and can thus be redirected to an ASCII
file:
.br
fbssum fBsub.pha > lightcurve.txt

Energy ranges are specified by a list of channel bin numbers, each of which is
the start of a new range; the preceding energy channel bin is used as the end
of the previous range - hence, the ranges have to be contiguous.  The last
channel bin number in the list is the closing channel bin for the last range.
If nothing is specified, all available energy channel bins are lumped into a
single energy range.  If only one number is provided, this is assumed to be
the start channel bin of the single range that will contain all following
channel bins.

Beware!  The energy channel bins are to be specified as they appear in the
input file, not the instrument's native channels numbers, and starting at
0 (zero).  For GoodXenon, the two are identical: 0 through 255.  But for
E_31us_64M_24_2s (for instance) channel bins 0 through 63 will cover native
channels 24 through 255 (in some complicated binning scheme); chanbins="16"
would throw the configuration's channel bins 16 through 63 into a single
energy range.

Fbssum will print the light curve for each of the channel ranges in a
format that is suitable for plotting by most generic plotting packages.
In addition to a count rate column for each energy range, there is an error
column for each range, a log(hardness ratio) column for each pair of
adjacent energy ranges (if more than one is specified and if hratio=yes),
a column with the phase, one with the Modified Julian Day, and one with
the exposure for the phase bin.  Modified Julian Day is defined as:
.br
MJD = JD - 2400000.5

At the top of the output, fbssum prints the baseline level for each
energy range and, if a startphase is provided, a simple peak analysis
for the phase range specified: the phase of the peak bin (Peak); the zeroeth,
first, second, and third moments of the pulse in the phase range, taking
into account all bins exceeding a count rate of (threshold) times the peak
bin (Mom0, Mom1, Mom2, Mom3); and the peak phase as determined by a simple
parabolic fit to the peak phase bin and its two neighbors (Pk2p).  All this
header information is formatted in such a way that it does not interfere
with the plotting of the light curves.

.ih
PARAMETERS
.ls infile [string]
Input file name; this needs to be an fB file.
.le
.ls chanbins [string]
A list of start channels for energy ranges, plus the final end channel;
if none are given, the entire energy range is summed together; if only one
number is given, that is taken as the start of a single range that is to end
at the highest channel number; otherwise, ranges will be contiguous.
.le
.ls (hratio = no) [boolean]
Calculate hardness ratios? If yes, the log of the ratios of the
rates in adjacent energy ranges (as specified by chanbins, if more
than one) are tabulated.
.le
.ls (startphase = -1.0) [double] 
Start phase for peak analysis; if not provided this analysis will
not be carried out.
.le
.ls (endphase = 1.0) [double] 
Stop phase for peak analysis; if not provided this analysis will
not be carried out.
.le
.ls (threshold = 0.25) [double] 
Threshold in terms of fraction of the peak for peak analysis.
.le
.ls (mode = ql) [string]
FTOOLS internal -- users should not need to change.
.le
.ih
EXAMPLES
.ih    
NOTES:
Output is to the terminal.

See the help file for FASEBIN for details.
.ih
BUGS
.le
.ls Please report problems to xtehelp@athena.gsfc.nasa.gov.
.le
.ih
SEE ALSO
FASEBIN FBADD FBFSUM FBSUB
.endhelp
