gtlike Help FileThe gtlike tool performs unbinned and binned likelihood analysis of the LAT data.
The application of the likelihood method to photon-counting experiments was described by Cash 1979 (Cash W. 1979, ApJ 228, 939). Maximum likelihood method was applied in the analysis of EGRET data as parameter estimation (Mattox J. R. et al 1996, ApJ 461, 396), and it will be applied in the analysis of GLAST data as well. The likelihood statistic L is the probability of obtaining observational data given an input model. In our case, the input model is the distribution of gamma-ray sources on the sky, and includes their intensity and spectra. We use this likelihood to find the best fit model parameters. These parameters include the description of a source's spectrum, its position, and intensity. During its lifetime, Fermi LAT will observe hundreds of millions of photons (counts), but for most analyses we will be interested in a subset of only a few hundred or a few thousand. The data will be too sparse to allow the use of CHI2 as test statistic. In that case, a full Poisson likelihood is needed for model parameter estimation. For a small number of counts, the unbinned likelihood can be calculated rapidly; but as the number of counts increases the time to calculate the likelihood becomes prohibitive, and the binned likelihood must be used. For an overview of the mathematical and statistical reason to apply the likelihood analysis in the analysis of the GLAST data, it is highly recommended that you read the Likelihood Overview (adapted from the FSSC's Cicerone). In the next section, the definition of source region on region of interest are given. The explanation of how to generate the source model for the likelihood analysis is described after that. The different optimizers to produce the fitting in the likelihood analysis are given in the Model Fitting section. Finally, an overview of the steps of how to perform an unbinned and binned likelihood analysis is described. SOURCE REGION AND REGION OF INTERESTDue to the large LAT point spread function at low energies (e.g., 68% of the counts will be within 3.5 degrees at 100 MeV (see GLAST LAT Performance for a review of LAT performance); to analyze a single source, the counts within a region around the source have to be included. We call that region the "region of interest" (ROI). The ROI is selected from the original event file using the gtselect tool. (See gtselect and gtselect Help.) The ROI should be several times the characteristic PSF size in order to satisfy the restrictions of the Likelihood package. Nearby sources will contribute counts to that region, so they have to be included in the model as well. The region that includes those sources is called "Source Region". All these sources will be in the source model file that has to be input in gtlike. (See the "Source Model section.) The "Source Region" is centered on the ROI, with a radius that is larger than the ROI radius by several PSF length scales. For example, when fitting a single point source, an ROI with a radius of 10 degrees and a Source Region radius of 20 degrees would be appropriate. Since the size of the LAT PSF goes roughly as (PSF_100MeV) x (E/100)^{-0.8} (with E in MeV), if you are considering only higher energy photons (e.g., > 1 GeV) smaller ROI and Source Region radii of just a few degrees may be used. THE SOURCE MODELThe gtlike tool reads the source model from an XML file. SAE has a GUI-tool called the Model Editor (modeleditor) that can be used to create this file without any knowledge of xml. MODEL FITTINGOptimizers. In the Fermi ScienceTools there are five optimizers to maximize the log likelihood function: DRMNGB, DRMNFB, NEWMINUIT, MINUIT and LBFGS. The optimizers determine the best-fit spectral parameters, but not the location; the source coordinates are fixed. However, a tool is provided that performs a grid-search, mapping out the maximum likelihood value over a grid of locations: gtfindsrc. (See gtfindsrc and gtfindsrc Help; also see gttsmap and gttsmap Help.) DRMNGB finds the local minima of a continuously differentiable function subject to simple upper and lower bound constrains. It uses a variant of Newton's method with quasi-Newton Hessian updating method, and model/trust-region technique to aid convergence from poor starting values. The original code obtained from Netlib is in Fortran, but it was converted to C++ and has some converge problems. DRMNFB interfaces with many of the same subroutines as DRMNGB, but handles the derivative information differently and does not seem to suffer from some of the convergence problems encountered with DRMNGB. MINUIT interfaces with the original FORTRAN Minuit processed by f2c (FORTRAN to C translator) and then adapted to compile as C++. In the Fermi Science Tools, only a few of MINUIT's possibilities are used. For example, all variables are treated as bounded. No user interaction is allowed, and only the MIGRAD algorithm is implemented. For more information about MINUIT, see the MINUIT Function Minimization and Error Analysis Reference Manual, available from the documentation section of the Minuit website. NEWMINUIT interfaces with an entirely **NEW** code of 'true' C++ designed in an object-oriented way. It is based on the original MINUIT for algorithms and functionality and uses only a few of MINUIT's features: the MIGRAD and HESSE algorithms. All variables are treated as bounded. No user interaction is allowed and, while it has no limits on the number of free parameters, there is certainly a practical limit, beyond which any fit is suspect. The MINUIT manual suggests a maximum number of around 15. LBFGS was originally obtained from Netlib. The original code is in Fortran, but as with the others, it was translated to C++. The "L'' in the name means "limited memory''. That means that the full approximate Hessian is not available. Note: Generally speaking, the fastest way to find the parameters estimation in the likelihood Fermi ScienceTool is to use the DRMNGB (or DRMNFB) approach to find initial values and then use MINUIT (or NEWMINUIT) to find more accurate results. PROCEDURE FOR LIKELIHOOD ANALYSISThere are two possible ways to perform a likelihood analysis in the LAT data: Unbinned and binned likelihood. A summary for each case is given in the following subsections; a further explanation can be obtained from the Workbook's LAT Science Tools section (click on the Source Analysis button). 1-UNBINNED LIKELIHOOD ANALYSISThe event data file provided by the GSSC website and the spacecraft data file are needed to perform a likelihood analysis. For simulated data, the spacecraft data file could be produced by gtorbsim (see the gtorbsim Help File), but real data can be obtained from the GSSC website. You can also perform a likelihood analysis for simulated LAT data. (See the gtobssim Help File, to know how to generate simulated data.) To perform an unbinned likelihood, several Fermi ScienceTools have to be run before running gtlike. The following paragraphs describe the steps to obtain the significance of a given detection:
2) BINNED LIKELIHOOD ANALYSISTo perform a binned likelihood analysis the event data file and the spacecraft data file are needed. Both files could be obtained from the GSSC website. There are several steps to perform a binned likelihood analysis; the full description of all of them is in the workbook. The summary is given below:
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). Note: "Hidden" parameters are not prompted. If you want to override one of the "hidden" parameters, specify the values in the command line. For example, if you want to change the relative fit tolerance, enter (at the command line): gtlike ftol=1e-3 gtlike has specific parameters for each of the statistics selected; for example, the parameter cmap only works if you chose the binned likelihood. An example of how to run the tool for unbinned likelihood analysis is given below:
In the example above the event file is called 3C279_3C273_back_filtered.fits. It is a file that contains simulated data for 3C279, 3C273 and the Galactic and Extragalactic background. The source model with the spectral and spatial information includes the sources 3C279, 3C273 and the Galactic and Extragalactic background, and it is called src_model.xml. The exposure cube and exposure map were produced previously with gtltcube and gtexpmap, respectively. NEWMINUIT was chosen as optimizer. The Spacecraft data file selected was: FT2.fits and the response function P6_V3_DIFFUSE was selected. The results of the likelihood analysis are printed in the Standard Output and also saved in an ASCII file (results.dat) and in a FITS file with information of the number of counts and fluxes for each energy bin and for each source. The above example can also be run from the command line as follows:
Example 2: Binned likelihood analysis An example of how to run the tool for a binned likelihood analysis is given below:
In the example the livetime cube was previously generated by gtltcube, the source maps was generated by gtsrcmaps, NEWMINUIT was chosen as optimizer and the response function P6_V3_DIFFUSE was selected. The above example can also be run from the command line as follows:
|