NAME

    gteffbkg - Creates maps of the effective background for a point 
    source as a function of position and energy


USAGE

    gteffbkg cmap outfile irfs expcube bexpmap efact


DESCRIPTION

    This tool is used to estimate the effective background that is 
    present for a point source as a function of position and energy.  
    This estimate is defined so that the square root of the effective 
    background is very close to the expected contribution to the 
    uncertainty on a likelihood fit for a point source coming from
    statistical uncertainty of the background model.   It can also 
    be used estimate the effect of systematic uncertainties of the 
    background model, when they can be parametrized as a fraction of 
    the effective background.  


PARAMETERS

    cmap [filename] 
        FITS file containing a counts cube representation of the 
	background model we want to compute the effective background for.

    outfile [filename]
       Name of the output FITS file that will contain the generated 
       effective background map.

    irfs [string]
         Instrument response functions. The instrument response (PSF,
         effective area, energy resolution) is currently a function of
         energy, inclination angle (the angle between the source and
         the LAT normal) and photon category. Since the LAT will
         usually survey the sky, a source will be observed at
         different inclination angles. Each count will therefore be
         characterized by a different instrument response function
         (IRF). The default value is “CALDB”.

     evtype [integer]
   	  The evtype to be used in generating the background data. The
   	  default is INDEF which will use the default in the input
   	  file. This can be overridden by entering the desired event
   	  type e.g. 3 for FRONT + BACK events.

    expcube [filename]
	 FITS file containing livetime as a function of sky position
	 and off-axis angle. This file can be generated by gtltcube or
	 obtained from the FSSC website. See the gtltcube help for
	 further explanation.

    bexpmap [filename]
         Binned exposure map for on-the-fly source map
         calculations. If the existing file is specified, that file
         will be used as the exposure map. Otherwise, a map with that
         name will be computed based on the energy bands in the
         srcmaps file. If "none" is given (default value), the map
         will be called "binned_exposure.fits".

    efact [float] 
         Energy integration factor.  For any particular energy E we
	 integrate the background from E/efact to E when we compute
	 the effective background.

    (edisp_bins) [integer]
         Number of extra bins to compute for energy dispersion purposes.
	 This needed to initialize the code, but is not actually used
	 in the computation of the effective background.

    (chatter) [integer]
         This parameter fixes the output verbosity: no screen output (0),
         nominal screen output (2), maximum verbosity (4). Default is "2".

    (clobber) [boolean]
         If true, an existing file of the same name will be overwritten.
         Default is "yes".

    (debug) [boolean]
         Activate debugging mode. Default is "no". When debug is "no",
         all exceptions that are not caught and handled by individual
         tool-specific code are caught by a top-level exception
         handler that displays information about the exception and
         then exits. When debug is "yes", such exceptions are not
         caught by the top level code. Instead the tool produces a
         segmentation violation, which is more useful for
         debugging. When debugging mode is enabled, the tool produces
         more verbose output describing any errors or exceptions that
         are encountered.

    (gui) [boolean]
         Graphical User Interface (GUI) mode is activated if set to
         "yes".  Default is "no".

    (mode) [string]
         Mode of automatic parameters: "h" for batch, "ql" for
         interactive.  Default is "ql".


EXAMPLES

    Parameters are passed following the FTOOLs model: They could be
    passed answering from a prompt, as a list in a command line, or by
    editing the parameter file.

    To run gteffbkg simply type in the command line:

    > gteffbkg

    The parameter values have to be provided. Not all parameter are
    prompted: some of them are "hidden". To change one of the "hidden"
    parameter, the user should specify the values in the command line
    or modify its mode by editing the parameter file. For example, to
    avoid overwriting the outfile, the following command line has to
    be typed:

    > gteffbkg clobber=no

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

    > gteffbkg
    Input counts, source or model map file[] cmap.fits	
    Output File[] effbkg.fits
    Response functions[CALDB]
    Exposure cube[] expCube.fits
    Binned exposure map[] bexposure.fits
    Energy integration factor[2] 

    That last example could be also run in the command line as follows:

    > gteffbkg cmap=cmap.fits outfile=effbkg.fits irfs=CALDB
    expcube=expCube.fits bexpmap=bexposure.fits efact=2.


SEE ALSO

    gtlike

    gtsrcmaps

    gtltcube

    gtalphbkg
    
    gtwtsmap

