gtexpcube Help: Archived

Please see the new gtexpcube2 Help documentation.

Usage: gtexpcube infile cmfile outfile irfs nxpix nypix pixscale coordsys xref yref axisrot proj emin emax enumbins

The gtexpcube generates an exposure map or a set of exposure maps for different energies, multiplying effective area by exposure, and integrating over solid angle. To create an exposure map with gtexpcube, you will need to generate an exposure livetime cube file. This file can be created using gtltcube (see the gtltcube documentation for a description of the livetime cubes, and additional details).

Alternatively, pre-generated exposure cubes can be obtained directly from SLAC's Data Portal. These pre-existing exposure cube files may cover the sky region of interest at different time ranges; thus, they may need to be merged before running gtexpcube. To add two livetime cubes together, use the gtltsum tool (see the gtltsum help for more information). You can also create an exposure map from each livetime cube, and then add the resulting exposure maps; but map generation is CPU-intensive, and it is recommended that you combine the cubes before creating the maps.

As input to gtexpcube, you will also need to provide: the number of pixels in horizontal and vertical dimensions (i.e., the nxpix and nypix parameters, respectively); the image scale in degrees/pixel (pixscale parameter); the response function (irfs parameter); as well as the horizontal and vertical positions of the center of the image (xref and yref parameters, respectively, in either Galactic or Celestial coordinates according to the coordsys parameter, which can be GAL or CEL). The energy binning parameters should also be input (emin in MeV, emax in MeV, and enumbins).

Optionally, you can produce the exposure map by inputting to gtexpcube a counts map FITS file generated with gtbin (see gtbin help), from which gtexpcube will match the coordinate projection and grid.

The units of the exposure maps created by gtexpcube are: cm2 s1.

After creating the exposure map you can examine the results using; for example, ds9 or fv.

Examples: gtexpcube

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).

To run gtexpcube interactively, simply type (at the command line): gtexpcube

You will then be prompted for parameter values.

Note: Not all parameter are prompted;some are "hidden". If you want to change one of the "hidden" parameters, specify the values in the command line. For example, if you want to change the bincalc parameter, enter (at the command line): gtexpcube bincalc=EDGE

In this case the energy layers are computed at the EDGE of the count map ebounds.

Example 1: To generate an exposure map using a single exposure cube, simply run the gtexpcube tool, which allows you to control the map generation parameters, including: Map center, size, scale, projection type, energy range, and number of energy bins.

The following example shows how to generate an all sky exposure map in an Aitoff projection:

> gtexpcube
This is gtexpcube version N/A
Exposure cube input file name [] : expCube_allsky_1week.fits
FT1 events input file name[] allsky.fits
Count map input file name (NONE for manual input of map geometry) [NONE]
Exposure map output file name [] : exposuremap.fits
Response function to use. Run gtirfs for a list[] P6_V3_DIFFUSE
Size of the X axis in pixels (leave at 1 for auto full sky) (1:) [1]
Size of the Y axis in pixels (leave at 1 to copy nxpix or auto full sky) (1:) [1]
Image scale (in degrees/pixel) (1:) [1]
Coordinate system (CEL - celestial, GAL -galactic) <CEL|GAL> [CEL] : GAL
First coordinate of image center in degrees (RA or galactic l) [0] :
Second coordinate of image center in degrees (DEC or galactic b) [-90] 0
Rotation angle of image axis, in degrees [0] :
Projection method <AIT|ARC|CAR|ZEA|GLS|MER|NCP|SIN|STG|TAN> [AIT] :
Start value for first energy bin [100.] :
Stop value for last energy bin [100000.] :
Number of logarithmically uniform energy bins [4] :
How are energy layers computed from count map ebounds? (CENTER|EDGE) [CENTER]
Creating an Exposure object from file expCube_allsky_1week.fits
Using Aeff(s)
Combining exposure from the response function(s), specified by "P6_V3_DIFFUSE":
P6_V3_DIFFUSE::FRONT
P6_V3_DIFFUSE::BACK
Cutoff used: 0.406737
Creating an Image, will write to file exposuremap.fits
Generating layer 0 at energy 208.114 MeV Aeff(0): 3509.08 cm^2
Generating layer 1 at energy 658.114 MeV Aeff(0): 6255.7 cm^2
Generating layer 2 at energy 2081.14 MeV Aeff(0): 7129.67 cm^2
Generating layer 3 at energy 6581.14 MeV Aeff(0): 7394.34 cm^2

You are prompted for an exposure cube, which in this case is called expCube_allsky_1week.fits, and it was previously created using gtltcube (see the gtltcube help). In the example the geometry was entered by hand, so "NONE" was selected in the cmfile parameter. After that, the output FITS file name and the irfs was specified. A map of the entire sky was created, with 1 degree bins centered on Galactic Coordinates 1=0, b=0. A total number of 4 energy logarithmic bins were selected starting from an energy of 100 MeV and ending in 100 GeV.

Once the output exposure FITS file has been generated, it can be viewed with a FITS viewer such as ds9 or fv. It contains a data structure with layers corresponding to the number of bins specified.

The previous example can also be run in the command line as follows:

>gtexpcube infile= expCube_allsky_1week.fits cmfile=NONE outfile=
exposuremap.fits irfs=P6_V3_DIFFUSE nxpix=1 nypix=1 pixscale=1
coordsys=GAL xref=0 yref=0 axisrot=0 emin=100 emax=100000 enumbins=4
bincalc=CENTER

Example 2:

To generate an exposure map using a count map as input you should first create that count map using the gtbin tool (see the gtbin documentation). The following example details how to run the tool by inputting a count map:

>gtexpcube  
This is gtexpcube version N/A
Exposure cube input file name[] expCube_allsky_1week.fits
FT1 events input file name[NONE]allsky.fits
Count map input file name (NONE for manual input of map geometry)[NONE] allsky_cnts.fits
Exposure map output file name[] exposuremap_withcntmap.fits
Response function to use. Run gtirfs for a list[]P6_V3_DIFFUSE
Image properties copied from file allsky_cnts.fits
How are energy layers computed from count map ebounds? (CENTER|EDGE) [CENTER]
Creating an Exposure object from file expCube_allsky_1week.fits
Using Aeff(s)
Combining exposure from the response function(s), specified by "P6_V3_DIFFUSE":
P6_V3_DIFFUSE::FRONT
P6_V3_DIFFUSE::BACK
Cutoff used: 0.406737
Creating an Image, will write to file exposuremap_withcntmap.fits
Generating layer 0 at energy 60.09 MeV Aeff(0): 44.6284 cm^2
Generating layer 1 at energy 180.63 MeV Aeff(0): 3001.03 cm^2
Generating layer 2 at energy 542.974 MeV Aeff(0): 5834.65 cm^2
Generating layer 3 at energy 1632.18 MeV Aeff(0): 7144.48 cm^2
Generating layer 4 at energy 4906.32 MeV Aeff(0): 7208.28 cm^2
Generating layer 5 at energy 14748.4 MeV Aeff(0): 7707.91 cm^2
Generating layer 6 at energy 44333.6 MeV Aeff(0): 8329.42 cm^2
Generating layer 7 at energy 133267 MeV Aeff(0): 8058.14 cm^2

All the binning parameters (in energy and space) are taken directly from the count map (in this case, named allsky_cnts.fits). The user then enters name of the livetime cube file (previously created with gtltcube), the names of the irfs file, and the name of the output exposure FITS file.


Owned by: Toby Burnett

 

Last updated by: Chuck Patterson 01/13/2011