like -- Performs Maximum Likelihood analysis of EGRET sky maps. Provides menu driven options.
like datadir calibdir tempfildir cmapfile emapfile gmapfile ranal lmapfile gbiasfile miscdir egretdoc phase0 phase1 phase2 phase3 phase4 phase5 phase6 phase7 phase8 phase9 phase10
This is the FTOOLS version of the EGRET team "like" program. Its purpose is to apply a maximum liklihood analysis to the EGRET skymaps, to determine the significance, position, fluxes and spectral information for point source candidates.
The likelihood ratio test is used to determine the significance of point sources. It is based on the maximum-liklihood algorthim described in Mattox and Macomb (1993) <ftp://cossc.gsfc.nasa.gov/pub/software/egret/like.tex>; also refer to Mattox, J.R., et al 1996, ApJ, 461, 396. Note however, that the Mattox & Macomb (1993) document makes specific references to an older version of the code, so some of the interactive commands no longer work as described. It also discusses a "control file" interface, and directory structures which are now handled by the FTOOLS parameter file interface. The original code had numerous authors, both at GSFC and the Max Planck Institute.
The EGRET point source analysis program, like, is used analyze the EGRET data (FITS Count and Exposure maps, as well as some auxilliary files) with the goal of point source detection, localization, and spectral characterization. Specifically, it is designed to find an excess above the predicted diffuse-background flux which is consistent with the instrument point spread function (PSF). It also has parameter-estimation capbilities. LIKE uses a maximum likelihood method (e.g. Cash, 1979,ApJ, 228, 939)
Experience with flight data from the CGRO mission indicates that the maximum liklihood method provides reliable gamma-ray results (e.g. Mattox et al 1996). The method allows simultaneous estimation of background model parameters (a multiplier for a diffuse galactic emission model and the intensity of isotropic emission) and the intensity of emission from a hypothetical point source distributed as the EGRET PSF.
The maximum-liklihood ratio test provides a means to evaluate the strength of the evidence for the existence of a point source of gamma rays. By a well known theorem, -2 times the log of the ml-ratio (the likelihood of the data without a point source, or the null hypothesis, divided by the likelihood of the data with a point source which is the alternative hypothesis) is distributed as chi-square with one degree of freedom (source strength at a predetermined location). If the source is not detected, the dependence of the ml-ratio on the intensity of the hypothetical point source may be used to obtain an upper limit. The dependence of the ml-ratio on the assumed position of the point source allows for estimation of the source position and the uncertainty of this position. In addition, estimates of the intensity of emission for sub-intervals of the EGRET energy range are used to obtain EGRET spectra.
Like is a Fortran program, migrated to FTOOLS for LHEASoft 5.2, which accomplishes all the above tasks. Its primary inputs are the counts and exposure maps produced by the related programs emapgen and intmap (also see eaddmap) respectively. In addition, it uses a maps of expected diffuse galactic emission which are available from the CGRO data archive. All input maps are expected to be in standard FITS format; reading and writing of FITS files is accomplished using the GSFC FITSIO package.
Like is a very resource intensive application. Our recommended minumum system resource requirements are 256 Mb main memory, and about 150-200 Mb of scratch disk space for temporary files.
At the "like>" prompt, there are various interactive commands, summarized below.
In this example, like is run with the parameter file displayed below. The second energy range (100 MeV - 99999 MeV) is selected, and an interactive command, GBC, to deterimne the Grnult, Gbias, and Counts simultaneously for a fixed position, in this case that of the Crab pulsar, is executed: Parameter File:
# sample parameter file for like # # directory paths for input data, calibration, and temporary files # datadir,s,h,"/mydisk/egret/data_dir/",,,"Path to the input FITS files:" calibdir,s,h,"/mydisk/egret/calib_dir/",,,"Path to the input Calibration files:" tempfildir,s,h,"/mydisk/egret/tempbin_dir/",,,"Directory for temporary files:" # # input data files (count, exposure maps) and galactic diffuse emission model # cmapfile,s,a,"counts_vp0040_g002",,,"Name of the input FITS Counts Map:" emapfile,s,a,"exposr_vp0040_g002",,,"Name of the input FITS Exposure Map:" gmapfile,s,a,"cfgas.cel.g002b",,,"Name of the input FITS Diffuse Background Map:" # # radius of useful analysis region # ranal,r,a,15,,,"Desired radius for analysis:" # # oprional output files (generally not used) # lmapfile,s,a,"NONE",,,"Name of output file for Maximum Likelihood Map (def=NONE):" gbiasfile,s,a,"NONE",,,"Name of output file for Gbias Map (def=NONE):" # # directory path for output (exposure and intensity maps) and miscellaneous files # miscdir,s,a,"/mydisk/egret/misc_dir/",,,"Directory for miscelaneous files:" outputdir,s,a,"/mydisk/egret/output_dir/",,,"Path to the output files:" # # the following directory specification are retained for historical reasons # and are usually not needed. they may be useful for production processing # egretdoc,s,h,".",,,"Path to EGRET document directory:" phase0,s,h,".",,,"User defined path:" phase1,s,h,".",,,"Path to cycle 1 FITS directory:" phase2,s,h,".",,,"Path to cycle 2 FITS directory:" phase3,s,h,".",,,"Path to cycle 3 FITS directory:" phase4,s,h,".",,,"Path to cycle 4 FITS directory:" phase5,s,h,".",,,"Path to cycle 5 FITS directory:" phase6,s,h,".",,,"Path to cycle 6 FITS directory:" phase7,s,h,".",,,"Path to cycle 7 FITS directory or user defined path:" phase8,s,h,".",,,"Path to cycle 1 FITS directory or user defined path:" phase9,s,h,".",,,"Path to cycle 1 FITS directory or user defined path:" phase10,s,h,".",,,"Path to cycle 1 FITS directory or user defined path:" # clobber,i,ql,1,,,"Do you want to delete any existing output files? (Yes):" mode,s,h,"ql",,,""
now run like using these inputs, and select energy range 2:
% like ... ----------------------------------------- THERE ARE 2 IMAGES with energy ranges: 1 30 MeV - 100 MeV 2 100 MeV - 99999 MeV WHICH DO YOU WANT? 2 Then, use the gbc command to obtain a flux: like>gbc Input counts test point: GLON and GLAT (A to abort, cr for 189.750 -5.250):184.5 -5.86 Input Source Name (cr for ):Crab Correlation coefficient for Counts/Gmult: -0.0772200525 Correlation coefficient for Counts/Gbias: -0.0168280266 Correlation coefficient for Gmult/Gbias: -0.937903702 Gmult 0.879582 +/- 0.049064 Gbias 4.495169 +/- 0.376795 Counts 875.92 +/- 45.46 Corresponding flux 214.573013 +/- 11.136075 10^-8 cm^-2 s^-1 Log likelihood: 2551.11 like> In this example, a TS (test statistic, i.e. significance) map of the whole field with the command "lpi" at the "like>" prompt. Specifically, these the responses lpi,m,#C,C,<ret>,<ret>
The files needed to run like are downloadable from the CGRO public data archive; <ftp://cossc.gsfc.nasa.gov/compton/data/egret/>. Look in the "high_level" directory for the counts and exposure maps, in the "diffuse_model" directories for the background maps, and the "calib" directory for the calibration files. Examples are:
datadir/counts_vp0040_g002.fits #sample counts map datadir/exposr_vp0040_g002.fits #sample exposure map file datadir/cfgas.cel.g002b #sample galactic diffuse background map datadir/cfgas.gal.g002b #same but in galactic coordinates datadir/catlog #catalof file (ascii), obtain from archive calibdir/edpfil01.fits #sample (energy dispersion) calibration file calibdir/psdfil01.fits #sample (point-spread function) calibration file calibdir/sarfil01.fits #sample (sensitive area correction) calibration file miscdir/timeline #EGRET Timeline file (download from archive)