NAME gtfindsrc - Optimizes a point source location using the likelihood test-statistic. USAGE gtfindsrc evfile scfile outfile irfs expcube expmap srcmdl target coordsys ra dec optimizer ftol atol DESCRIPTION This tool finds point source locations using an unbinned likelihood analysis. This is accomplished by using the multidimensional minimization routine: downhill simplex method (see, for example, Numerical Recipes Chapter 10: http://www.fizyka.umk.pl/nrbook/bookcpdf.html), 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 the gtlike help for more details). For that reason the tools gtltcube and gtexpmap, which produce respectively the live-time cube, and the exposure maps for the unbinned analysis, have to be run prior running this tool. It is also highly recommended to run gtdiffrsp before running this tool (see the gtdiffrsp help for further explanation). The outputs are given in an ASCII file where the initial starting values, the intermediate, as well as the final values for the best fit position, the TS and the circle radius are given. If the default value of "chatter" is given (chatter=2) the tool also outputs in the screen a summary with the best fit position and the error circle radius (in decimal degrees). PARAMETERS evfile [file] Input event file. If several events files have to be input, an ASCII file with the complete list of them should be entered here. (evtable = EVENTS) [string] Event extension name. This is a hidden parameter. The default value is "EVENTS". scfile [file] Spacecraft data file containing information such as the spacecraft pointing as a function of time. This file could be generated by gtorbsim for simulated observations (see the gtorbsim help for further explanation) or more commonly it can be obtained from the FSSC. (sctable = SC_DATA) [string] Spacecraft data extension. This is a hidden parameter. The default value is SC_DATA. outfile [file] Output file name. The output file is an ASCII file where the initial starting values, the intermediate, as well as the final values for the best fit position (RA and DEC), the TS and the circle radius (in decimal degrees) are given. irfs [string] Instrument response functions. expcube [file] FITS file containing live-time as a function of sky position and off-axis angle. This file should be generated by gtltcube. See the gtltcube help for further explanation. expmap [file] Exposure map file used in an unbinned likelihood analysis and created by gtexpmap. See the gtexpmap help for further explanation. srcmdl [file] XML file containing the source model definition. This is the same source model file used by gtlike (see the gtlike help). The source model could be generated by ModelEditor or following source model templates. See the ModelEditor help for further explanation. target [string] Target source name from srcmdl. This is the name of the source for which the best position will be optimized with gtfindsrc. coordsys = CEL [string] Coordinate system for input of the putative point source. If you choose CEL you will be prompted for ra and dec (J2000), if you choose GAL you will be prompted for l and b coordinates ra <-360 - 360> [double] Initial guess for the source right ascension (decimal degrees). The default value is zero. dec <-90 - 90> [double] Initial guess for the source declination (decimal degrees). The default value is zero. l <-360 - 360> [double] Initial guess for the source Galactic longitude (decimal degrees). The default value is zero. b <-90 - 90> [double] Initial guess for source Galactic latitude (decimal degrees). The default value is zero. optimizer [string] Optimizer package to use (see the gtlike documentation). Due to the fact that gtfindsrc calls the same routines as gtlike to obtain the TS of the detection at each analyzed position, the optimizer should be the same than the ones used for that tool. The default value is "MINUIT". ftol = 1e-2 [double] Fit tolerance. This is the fit tolerance for the likelihood analysis. It is the same parameter used for gtlike. See the gtlike help for further explanation. The default value is 1e-8. (reopt = yes) [bool] Refit all free parameters at each candidate point source location. The "free" parameters are the parameters marked as "free" in the source model file, and are the ones to be fitted in the likelihood analysis. See the gtlike help more explanation on the subject. This is a hidden parameter the default value is "yes". atol = 0.01 [double] Convergence tolerance for positional fit. The default value is 0.001(decimal degrees). (toltype = ABS) Fit tolerance convergence type (absolute vs relative). (posacc = 0.001) [double] Accuracy for best-fit position (decimal deg). This is a hidden parameter. The default value is "0.001". (chatter = 2) Output verbosity. This is a hidden parameter. The default value is 2. (clobber = yes) This parameter fixes the output verbosity: no screen output (0), nominal screen output (2), maximum verbosity (4). The default value is 2. (debug = no) Activate debugging mode. This is a hidden parameter. The default value 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 = no) Graphical user Interface (GUI) mode activated if "yes" is specified. This is a hidden parameter. The default value is "no". (mode = ql) Mode of automatic parameters. This is a hidden parameter. The default value 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. This allows calling gtfindsrc from a script. To be prompted for gtfindsrc simply type in the command line: >gtfindsrc You will be prompted for parameter values. Beware that not all parameters are prompted: some of them are "hidden". If you want to change one of the "hidden" parameter you should specify the values in the command line. For example if you want to have a better accuracy for the best fit position (than the default, posacc = 0.001) you should type in the command line: >gtfindsrc posacc=0.0001 An example of how to run the tool is given below: > gtfindsrc Event file[] events.fits Spacecraft file[] spacecraft_data_fle.fits Output file for trial points[] test Response functions to use[] P6_V3_DIFFUSE Livetime cube file[none] expCube.fits Unbinned exposure map[none] expMap.fits Source model file[none] src_model.xml Building source model from src_model.xml -log-likelihood of input source model 4059.27 Target source name [point_src1] Optimizer [MINUIT] Tolerance for -log(Likelihood) at each trial point [1e-2] Covergence tolerance for positional fit [0.01] Best fit position: 50.4522, -37.2381 Error circle radius: 0.116836 The last example could be also run in the command line as follows: >gtfinsrc evfile=events.fits scfile=spacecraft_data_file.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 KNOWN BUGS SEE ALSO gttsmap gtexpmap gtltcube gtdiffrsp gtlike modeleditor