gtbindef Help File

gtbindef creates the FITS file that is needed by the gtbin tool in order to generate customized binning in energy or time of a given event file. This tool complements the gtbin tool and is used in combination with it. A user may, for example, wish to create a light curve with non-uniform binning, in the case of flaring or transient sources. The output FITS file created by gtbindef, with information about the user-specified binning, will be used as input to gtbin.

USAGE: gtbindef bintype binfile outfile energyunits

Example: gtbindef

Use gtbindef to create a FITS file for input to gtbin in order to generate specific energy binning.

Parameters are passed following the FTOOLs model (i.e., they can be passed interactively by: answering a prompt; as a list in a command line; or by editing the parameter file). To be prompted for gtbindef parameter values, type (at the command line prompt): gtbindef

Note: Not all parameters are prompted; some are "hidden". In order to change one of the "hidden" parameters, specify its value in the command line. For example, to prevent overwriting an existing output file, type (at the command line prompt): gtbindef clobber=no

Procedure

  1. Create an ASCII file as input to gtbindef. This file will have the initial and final energies for each bin. For example, suppose the input ASCII file is named energy_bins_gtbindef, and it contains:

30 50
50 100
100 300
300 1000
1000 3000
3000 10000
10000 200000

Note: The code interprets these numbers as reals.

  1. Run gtbindef as follows:

> gtbindef
This is version N/A
Type of bins, E -- energy or T -- time [E] :
File containing the ascii bin definitions [] : energy_bins_gtbindef
Output file name [] : energy_bins_gtbindef.fits
Units of input energy bins: MeV, GeV, keV, or eV [MeV] :

In this example:

An energy binning was selected (bintype = E). The name of the ASCII file is "energy_bins_gtbindef", and it is passed in the binfile parameter (binfile = energy_bins_gtbindef).

The output FITS file is energy_bins_gtbindef.fits (outfile =
energy_bins_gtbindef.fits
), and the units used are MeV (energyunits = MeV).

  1. After running gtbindef, run gtbin to create the spectra using the selected bins.

Owned by: Yasushi Ikebe ikebe@milkyway.gsfc.nasa.gov
  James Peachey peachey@lheamail.gsfc.nasa.gov
Last updated by: Chuck Patterson 02/10/2011