See gtexpcube2:

Help | Examples

Also see:


The new gtexpcube2 tool replaces the old gtexpcube application from the map_tools package, and it also replaces the "on-the-fly" binned exposure map calculation that was provided by gtsrcmaps.

The new gtexpcube2 tool accounts for the phi-modulation of the effective area for the irfs that implement this dependence (e.g., P6_v11_* and P7*_V4). gtexpcube2 also includes effects of the livetime-fraction dependent efficiency that has been available for the P6_V3_DIFFUSE irfs and will continue to be available in future irfs.

Note: gtexpcube2 replaces the gtexpcube application from the map_tools package, and is available in ScienceTools-09-20-00 and higher.

It is strongly recommended that the old gtexpcube application not be used for Likelihood analysis any longer. (See ScienceTools-09-20-00 New Feature Summary in confluence.)

If, for some reason, your work requires that you use an older version, please refer to the archived versions of the old gtexpcube Help and gtexpcube parameters documentation.


Generates an exposure map, or a set of exposure maps for different energies, from a livetime cube written by gtltcube.

Usage: gtexpcube2 infile cmap outfile irfs nxpix nypix binxz coordsys xref yref axisrot proj ebinalg emin emax enumbins ebinfile


Input Files:
  • Livetime or Exposure cube FITS file from gtltcube
  • Optionally, a counts map FITS file from gtbin, for which gtexpcube2 should match the coordinate projection and gridding.  The counts map also specifies the effective area response functions for gtexpcube2 to use.

General Parameters

  infile [file]
    Livetime cube file. FITS file containing livetime as a function of sky position and off-axis angle. This file can be generated by gtltcube, or obtained from SLAC's Data Portal. (See gtltcube help.)
  cmap [file]
    Counts map input FITS file. This file is generated using gtbin. (See gtbin help.) Select "none" if you wish to specify the map geometry from parameters (nxpix, nypix, xref, yref, enumbins, etc).
  outfile [file]
    Exposure map output FITS file name.
  irfs [string]
    The instrument response (PSF, effective area, energy resolution) is a function of energy, inclination angle (the angle between the source and the LAT normal), and photon category. Since the LAT usually surveys the sky, a source is observed at different inclination angles. Each count is therefore characterized by a different instrument response function (IRF).

Parameters for User-defined Map

  nxpix = 360 [int]
    Size of the X (i.e., horizontal) axis in pixels.
  nypix = 180 [int]
    Size of the Y (i.e., vertical) axis in pixels.
  binsz = 1 [float]
    Image scale (in degrees/pixel).
  coordsys = "GAL" [string: CEL|GAL]

Coordinate system (CEL - celestial, GAL - galactic). If you choose CEL, you will be prompted for RA and DEC (J2000) in the xref and yref parameters; if you choose GAL you will be prompted for (l) and (b) coordinates.

  xref = 0. [float]
    First Coordinate (i.e., horizontal) of image center either in degrees (RA) for celestial coordinates; or in decimal degrees decimal degrees (l) for galactic coordinates. (default: 0)
  yref = 0. [float]
    Second coordinate (i.e., vertical) of image center either in degrees (DEC) in celestial coordinates; or in decimal degrees (b) in Galactic coordinates. (default: 0)
  axisrot = 0. [float]
    Rotation angle desired for the image in degrees. (default: 0)
    Desired coordinate projection: Aitoff [AIT], Zenithal equal- area [ZEA], Zenithal equidistant [ARC], Plate Carree [CAR], Sanson-Flamsteed [GLS], Mercator [MER], North-Celestial-Pole [NCP], Slant orthographic [SIN], Stereographic [STG], Gnomonic [TAN]. See Calabretta & Greisen 2002, A&A, 395, 1077 for definitions of the projections. Must be AIT, ZEA, or CAR for auto full sky. The default value is CAR.
  ebinalg = "LOG" [string: LOG|FILE]
    Algorithm for defining energy gins.
  emin = 100 [float]
    Energy (MeV) of lower bound of first bin. (default: 100 MeV)
  emax = 300000 [float]
    Energy (MeV) of upper bound of last bin. (default: 300000 MeV)
  enumbins = 10 [int]
    Number of logarithmically spaced energy bins spanning emin to emax.
(default: 10)
  ebinfile = [string]
    Name of FITS file containing the energy bin definitions. (default: NONE)

Hidden parameters

  (bincalc="EDGE") [string: CENTER|EDGE]

Allows you to choose the energies at which the 2D exposure map layers are computed. bincalc=EDGE will cause the tool to compute the 2D exposure maps at the bounds of the energy bins specified in the counts map file; this option should be used for binned Likelihood analysis. bincalc=CENTER will cause the tool to compute the 2D exposure maps at the geometric means of the bounds of the energy bins in the counts map file.

(default: EDGE)

    Ignore phi information (i.e., phi-averaged effective area) in Livetime cube (default: no)
    Applies a theta cut on the entries from the livetime cube that are included in the exposure integrals. Units are degrees from the LAT's z-axis. The default is thmax=180 and should not be changed for standard Likelihood analyses.
    Applies a theta cut on the entries from the livetime cube that are included in the exposure integrals. Units are degrees from the LAT's z-axis. The default is thmin=0.

Exposure cube extension. (default: "Exposure")

    Output verbosity; no screen output (0), nominal screen output (2), maximum verbosity (4). (default: 2)
    Overwrite existing output files. (default: yes)

Activate debugging mode. (default: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.

    Mode of automatic parameters. (default: ql)

Also see: ViewVC: View of /Likelihood/pfiles/gtexpcube2.par.