gtfindsrc Help File

Optimizes a point source location using the likelihood test-statistic.

Usage: gtfindsrc evfile scfile outfile irfs expcube expmap srcmdl target coordsys ra dec l b optimizer ftol atol

This tool finds point source locations using an unbinned likelihood analysis. This is accomplished by using the multidimensional minimization routine: downhill simplex method (see Numerical Recipes, Chapter 10), which finds the best test-statistic (TS) for different positions around an initial guess until the convergence tolerance for a positional fit is reached. For each position where the given source is analyzed, a TS value is obtained using the same procedure as by gtlike. (See gtlike and gtlike Help.) For that reason the tools gtltcube and gtexpmap (which respectively produce the livetime cub and the exposure maps for the unbinned analysis) have to be run prior to running this tool. It is also highly recommended that you run gtdiffrsp before running this tool. The outputs are given in an ASCII file where the initial, intermediate, and the final values are given for the best fit position, the TS, and the circle radius. If the default value of "chatter" is given (chatter=2) the tool also outputs to the screen a summary with the best fit position and the error circle radius (in decimal degrees).

Examples: gtfindsrc

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). This allows calling gtfindsrc from a script.

To be prompted for gtfindsrc parameter values, enter (at the command line): gtfindsrc

Note: "Hidden" parameters are not prompted. If you want to change one of the "hidden" parameters, specify the values in the command line. For example, if you want to have a better accuracy than the default, posacc = 0.001 for the best fit position, enter (at the command line): gtfindsrc posacc=0.0001

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

> gtfindsrc
Event file [events] :
Spacecraft file [FT2.fits] :
Output file for trial points [test] :
Response functions to use [P6_V3_DIFFUSE] :
Livetime cube file [expCube.fits] :
Unbinned exposure map [expMap.fits] :
Source model file [src_model.xml] :

Building source model from src_model.xml
-log-likelihood of input source model: 4059.27
Target source name [point_src1] :
Optimizer <LBFGS|MINUIT|DRMNGB> [MINUIT] :
Tolerance for -log(Likelihood) at each trial point [1e-02] :
Covergence tolerance for positional fit [0.01] :
Best fit position: 50.4522, -37.2381
Error circle radius: 0.116836

This example can also be run from the command line as follows:

>gtfindsrc evfile=events scfile=FT2.fits outfile=test irfs=P6_V3_DIFFUSE
expcube=expCube.fits expmap=expMap.fits srcmdl=src_model.xml
target=point_src1 optimizer=MINUIT ftol=1e-2 atol=0.01


Owned by: J. Chiang  

Last updated by: Chuck Patterson 04/05/2011