NAME gtpsf - Calculates the effective point spread function, as a function of energy at a given source location, averaged over an observation. USAGE gtpsf expcube outfile irfs ra dec emin emax nenergies thetamax ntheta DESCRIPTION This tool calculates the effective point spread function, as a function of energy at a given source location, averaged over an observation. The theta and psf values are storaged in different extensions of the output FITS file. The allowed parameter ranges for emin, emax, and thetamax (see below) depend on which IRFs you are using. If you are outside the allowed ranges for a particular set of IRFs, then the code may (but not definitely) crash. PARAMETERS expcube [file] FITS file containing livetime as a function of sky position and off-axis angle also referred to as the "exposure hypercube file". This file should be generated by gtltcube. outfile [file] Name of the output FITS file. (outtable = PSF) [string] Name of the output file binary table extension which contains the results. This is a hidden parameter. The default value is PSF. irfs [string] Instrument response function. ra [double] Right Ascension (J2000) of desired source position in decimal degrees. dec [double] Declination (J2000) of desired source position in decimal degrees. emin = 20 [double] Minimum of the energy range covered, in MeV. The range of this parameter depends on the response function used. Currently it is recommended that emin be larger or equal to 18 MeV. emax = 2e5 [double] Maximum of the energy range covered, in MeV. The range of this parameter depends on the response function used. Currently it is recommended that emax be smaller or equal to 5.6e6 MeV. nenergies = 20 [int] Number of logarithmically spaced energies. It should be larger than 1. A typical value could be 20. thetamax = 30 [double] Maximum angle of apparent photon direction with respect to the source direction (degrees). ntheta = 300 [int] Number of linearly spaced theta bins. (chatter = 2) This parameter fixes the output verbosity: no screen output (0), nominal screen output (2), maximum verbosity (4). The default value is 2. (clobber = yes) Overwrite existing output files. This is a hidden parameter. The default value is: "yes". (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. 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 Gtpsf handles parameters following the FTOOLs model: They can be passed by answering a prompt or as a list in a command line. This facilitates calling gtpsf from a script. To be prompted for gtpsf options type in the command line: >gtpsf You will be prompted for the parameter values. Beware that not all parameter are prompted: some of the parameter are "hidden". If you want to change one of the "hidden" parameter you should specify the values in the command line or modify its mode by editing the parameter file. For example if you do not want to overwrite the existing output file, type in the command line: >gtpsf clobber=no An example of how to run the tool is given below: > gtpsf Livetime cube file[] expCube.fits output file name[] psf.fits Response functions[] P6_V3_DIFFUSE Source Right Ascension (J2000 degrees) (0:360) [] 193.98 Source Declination (J2000 degrees) (-90:90) [] -5.82 minimum energy (MeV)[20.] 100 maximum energy (MeV)[2e5] 100000 number of energies[20] maximum angle (degrees)[30.] number of angles[300] That last example could be also run in the command line as follows: >gtpsf expcube=expCube.fits outfile=psf.fits irfs=P6_V3_DIFFUSE ra=193.98 dec=-5.82 emin=100.0 emax=100000.0 nenergies=20 thetamax=30 ntheta=300 LIST OF BUGS SEE ALSO gtltcube