fbssum -- Allows averaging of fB files in energy and performs phase analysis.
fbssum infile chanbins hratio startphase endphase threshold
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:
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:
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.
Output is to the terminal.
See the help file for FASEBIN for details.
FASEBIN FBADD FBFSUM FBSUB