like_phase.pl: V0.12 (R. Corbet) -help like_bphase.pl Modified version of like_lc.pl to do binary phase selected fits. *** This script is _not_ suitable for pulse phase resolved fits. Typing like_bphase.pl -help will display this help information. Perl script that generates Fermi LAT light curves using likelihood analysis. This is not an official part of the Fermi analysis software. Caution. The models and other parameters used here are for demonstration purposes. You should carefully evaluate the choice of parameters for your own particular needs! To use this script you must be set up to run both the Fermi science tools and HEASOFT. This script checks the environment variables LHEASOFT, PFILES, and FERMI_DIR as a check on this. In addition, if you are using the auto-generation option to automatically make a model file from the 2FGL catalog, the environment variable MY_FERMI_DIR needs to be set. This is where the 2FGL catalog and the make2FGLxml.py script must be located if used. The model file generated by make2FGLxml.py uses the parameters in the 2FGL catalog. In this example only the parameters of the source of interest are left free, others are held fixed at their catalog values. Spectra are power laws. This may very well not be optimum! Among the inputs prompted for are two files: slist.dat This should contain a list of source names and their coordinates in the form: 2FGLJ0240.5+6113 40.1317, 61.2281 i.e. the 2FGL catalog name must be given because if you will use make2FGLxml.py to generate the model file. Note that there is _no_ space in the source name. i.e. "2FGLJ0240.5+6113" rather than "2FGL J0240.5+6113" Source names should not be duplicated because the output files are constructed from the source names. Optionally, an entry in the slist.dat file my have the form: A_Source 40.1317, 61.2281 super_model.xml where the 4th entry is the name of the model file to use for that source. The source name (e.g. "A_Source") must be contained in the model file specified. plist.dat This contains a list of photon files, one file per line. It is also necessary to provide a single spacecraft (FT2) file. Several temporary files are created while running this script. At least most are deleted at the end. The output file for each source is an ASCII file called XXX_like_lc.dat, where "XXX" is the source name as given in slist.dat This file contains: time (bin center, MJD), flux (cts/cm^2/s), flux error, time bin half width (days), TS value, spectral index, index error If the spectral model goes not include the parameter "Index" then "-99" is written instead. Other command line options: -start mjdstart The light curve will start at the specified time in units of MJD. -stop mjdstop The light curve will end at the specified time in units of MJD. -debug Increase chatter level to "2" from "0" CHANGES: 0.12 Change to phase selection algorithm 0.1 First version of like_phase.ps - derived from like_lc.pl version 1.45