gtbkg Help

Usage: gtbkg phafile outfile scfile expcube expmap irfs srcmdl target

The gtbkg tool creates a background spectrum file (PHA1), using as input several files that are created with other tools, including the:

  • input spectrum file (PHA1) created by gtbin.
  • live-time file, by gtltcube.
  • exposure map (i.e., the same as the one created for the unbinned likelihood analysis and created by gtexpmap).
  • source xml file (i.e., the same as the one used for the gtlike tool and created with Model Editor (modeleditor)).

The spectrum file that is created (in PHA1 format) contains total counts based on a Likelihood source model, and it covers the same energy bands and region-of-interest as the input PHA1 file (see the gtlike documentation for details). The model will typically contain interstellar and extragalactic diffuse components, as well as nearby point sources.

Example: gtbkg

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 gtbkg parameter values, simply type (at the command line): gtbkg

Note: Not all parameters are prompted; some parameters are "hidden". To change a "hidden" parameter, specify its value in the command line. For example, to prevent overwriting an existing output file, type: gtbkg clobber=no

An example of how to run the tool is given below:

> gtbkg
pha file [] : 3C279_3C273_back_filtered_pha1.fits
output file [] : pha1.fits
Spacecraft file [] : spacecraft_data_file.fits
Exposure hypercube file [] : expCube.fits
Exposure file [none] : expMap.fits
Response functions to use [P6_V3_DIFFUSE] :
Source model file [] : src_model.xml
Target source name (excluded from background estimate) [none] :3C279
Excluding source 3C279 from background model.

The file 3C279_3C273_back_filtered_pha1.fits was created using gtbin (option PHA1) from an original event file. The expMap.fits and the expCube.fits files were created with gtexpmap and gtltcube, respectively. 3C279 is the source excluded from the background model. The name "3C279" is the same as the one in the source model file.

To run the same example at the command line, type:

>gtbkg phafile=3C279_3C273_back_filtered_pha1.fits outfile=pha1.fits
scfile=spacecraft_data_file.fits expcube=expCube.fits expmap=expMap.fits
irfs=P6_V3_DIFFUSE srcmdl=src_model.xml target=3C279
Excluding source 3C279 from background model.

Owned by: J. Chiang

Last updated by: Chuck Patterson 01/03/2011