NOTE: The Galactic diffuse model for Pass 7 is singificantly larger than in previous releases. For some computers this can produce memory-related issues when running tools that use this model, such as gtlike, gtsrcprob, gtdiffrsp, and gtsrcmaps.
| Galactic diffuse model |
Event Selection/ IRF Name |
Isotropic spectral template |
|---|---|---|
| gal_2yearp7v6_v0.fits or gal_2yearp7v6_trim_v0.fits (see below for usage notes) |
Pass 7 (V6) Source (front+back) P7SOURCE_V6 |
iso_p7v6source.txt |
| Pass 7 (V6) Source (front) P7SOURCE_V6::FRONT |
iso_p7v6source_front.txt | |
| Pass 7 (V6) Source (back) P7SOURCE_V6::BACK |
iso_p7v6source_back.txt | |
| Pass 7 (V6) Clean (front+back) P7CLEAN_V6 |
iso_p7v6clean.txt | |
| 2 Year Pass 7 (V6) Clean (front) P7CLEAN_V6::FRONT |
iso_2yr_p7v6clean_front.txt | |
| 2 Year Pass 7 (V6) Clean (back) P7CLEAN_V6::BACK |
iso_2yr_p7v6clean_back.txt | |
| gll_iem_v02_P6_V11_DIFFUSE.fit | Pass 6 (V11) Diffuse (front+back) P6_V11_DIFFUSE |
isotropic_iem_v02_P6_V11_DIFFUSE.txt |
| Pass 6 (V11) Diffuse (front only) P6_V11_DIFFUSE::FRONT |
isotropic_iem_front_v02_P6_V11_DIFFUSE.txt | |
| Pass 6 (V11) Diffuse (back only) P6_V11_DIFFUSE::BACK |
isotropic_iem_back_v02_P6_V11_DIFFUSE.txt | |
| gll_iem_v02.fit | Pass 6 (V3) Diffuse (front+back) P6_V3_DIFFUSE |
isotropic_iem_v02.txt |
| Pass 6 (V3) Diffuse (front only) P6_V3_DIFFUSE::FRONT |
isotropic_iem_front_v02.txt | |
| Pass 6 (V3) Diffuse (back only) P6_V3_DIFFUSE::BACK |
isotropic_iem_back_v02.txt | |
| Pass 6 (V3) DataClean (front+back) P6_V3_DATACLEAN |
isotropic_iem_p6v3dataclean_v02.txt |
Many analyses of LAT data require models of Galactic diffuse and isotropic emission (see the likelihood analysis tutorial for an example). Find the detailed description of the models here.
The Galactic model is a spatial and spectral template. The model for the Galactic diffuse emission was developed using spectral line surveys of HI and CO (as a tracer of H2) to derive the distribution of interstellar gas in Galactocentric rings. Infrared tracers of dust column density were used to correct column densities in directions where the optical depth of HI was either over or under-estimated. The model of the diffuse gamma-ray emission was then constructed by fitting the gamma-ray emissivities of the rings in several energy bands to the LAT observations. The fitting also required a model of the inverse Compton emission calculated using GALPROP and a model for the isotropic diffuse emission. A complete description of the Pass 7 Galactic diffuse model is available.
Because gal_2yearp7v6_v0.fits can be difficult to use on computers with limited memory, a reduced-sized version of has been prepared by the LAT team by decreasing the number of planes in energy ranges over which the model is well approximated as a power law. The resulting model, gal_2yearp7v6_trim_v0.fits, has the same spatial distribution but is half the size. It can be used as a drop-in replacement for gal_2pyearp7v6_v0.fits in the XML specification of the Galactic diffuse emission model. The specification of the isotropic spectrum remains unchanged. The diffuse responses for unbinned likelihood analysis do not need to be recalculated for the reduced-size model, although if your analysis extends below 50 MeV (the lower energy limit for either model) the extrapolations will not be quite the same.
XML examples for both the standard and reduced-size Galactic diffuse models are provided below.
An isotropic spectral template provides the spectral form from a fit to the all-sky emission (|b|>30 deg) that is not represented in the Galactic diffuse model and therefore includes both extragalactic diffuse gamma rays and remaining residual (misclassified) cosmic-ray emission. The Pass 7 Source class contains a significant background contribution at high energies. An isotropic model is determined under the assumption of a specified Galactic diffuse model and for one of the LAT event class selections. The resulting spectral template should be used with the same Galactic diffuse model and event class selection that were used to derive it. The two columns in the isotropic template are: the central energy (in MeV) for the band, the differential flux in that band (in ph/cm2/s/MeV/sr).
The Pass 7 Ultraclean class does not have an isotropic spectral template because it is expected to be used to study the type of emission the template would model out of the data. Analysis using the Pass 7 Transient class typically requires case-specific estimates of the background and so no general template is provided.
Both the isotropic and Galactic diffuse models are now provided within the Science Tools release. This means your XML model will need to include the proper path to find the model files. You can place them in your local directory, or you can copy them into a single location for easy reference. It is necessary for your XML model to properly represent the source name (as is used in the LAT events files) as well as the proper path and filename for the model files. For this example, the models have been placed in the "/refdata/fermi/diffuseModels" directory under the Fermi Science Tools.
An example of the correct XML for these models is:
<source_library title="source library">
<source name="iso_p7v6source" type="DiffuseSource">
<spectrum file="$(FERMI_DIR)/refdata/fermi/diffuseModels/iso_p7v6source.txt" type="FileFunction">
<parameter free="1" max="1000" min="1e-05" name="Normalization" scale="1" value="1" />
</spectrum>
<spatialModel type="ConstantValue">
<parameter free="0" max="10.0" min="0.0" name="Value" scale="1.0" value="1.0"/>
</spatialModel>
</source>
<source name="gal_2yearp7v6_v0" type="DiffuseSource">
<spectrum type="ConstantValue">
<parameter free="1" max="10.0" min="0.0" name="Value" scale="1.0" value= "1.0"/>
</spectrum>
<spatialModel file="$(FERMI_DIR)/refdata/fermi/diffuseModels/gal_2yearp7v6_v0.fits" type="MapCubeFunction">
<parameter free="0" max="1000.0" min="0.001" name="Normalization" scale= "1.0" value="1.0"/>
</spatialModel>
</source>
</source_library>
The easiest way to generate XML models that use the new diffuse models is to run the user contributed tool "make2FGLxml.py" (available here). If the model files are in your current directory, a sample call that provides the proper output is:
>>> from make2FGLxml import *
This is make2FGLxml version 03.
NOTE: You must have run gtselect on the event file you use as input.
>>> mymodel = srcList('gll_psc_v04.fit','filtered_gti.fits','model.xml')
>>> mymodel.makeModel('gal_2yearp7v6_v0.fits', 'gal_2yearp7v6_v0', 'iso_p7v6source.txt', 'iso_p7v6source')
Creating file and adding sources for 2FGL
To use the reduced-size Galactic Diffuse model, replace the filename "gal_2yearp7v6_v0.fits" with "gal_2yearp7v6_trim_v0.fits" in the mymodel.makeModel portion of the python code above, or replace the Galactic diffuse source in your XML file with the following:
<source name="gal_2yearp7v6_v0" type="DiffuseSource">
<spectrum type="ConstantValue">
<parameter free="1" max="10.0" min="0.0" name="Value" scale="1.0" value= "1.0"/>
</spectrum>
<spatialModel file="$(FERMI_DIR)/refdata/fermi/diffuseModels/gal_2yearp7v6_trim_v0.fits" type="MapCubeFunction">
<parameter free="0" max="1000.0" min="0.001" name="Normalization" scale= "1.0" value="1.0"/>
</spatialModel>
</source>
The 2-year LAT catalog analysis required an additional all-sky component to account for emission from the earth limb that was not completely removed from the data at energies below 200 MeV. These are gamma-rays that are in the broad tails of the PSF and so pass the 100 degree zenith angle cut. The spatial template was derived from residuals in the 50–68 MeV energy range and assumed that the spatial shape is independent of energy. The very soft spectral template was derived by adding the limb template to the model. The template is specific to the 2-year data set because the residual earth limb emission depends on the orientation of the LAT. You can find the Earth limb template FITS file on the 2-year LAT catalog data products page.
The Earth limb template is the only all-sky model component to use files for both the spatial and spectral models. It is intended for use only for analysis of the 2-year dataset used in the second LAT catalog. To include the Earth limb in your analysis, download the model files from the 2-year LAT catalog data products page. Add the following source to your XML model, and ensure the path information to each model component is correct.
<source name="EarthLimb" type="DiffuseSource">
<spectrum file="$(PATH_TO_FILES)/limb_2year_P76_source_v0_smooth.txt" type="FileFunction">
<parameter free="1" max="1000" min="1e-05" name="Normalization" scale="1" value="1" />
</spectrum>
<spatialModel file="$(PATH_TO_FILES)/limb_2year_smooth.fits" type="SpatialMap">
<parameter free="0" max="1000.0" min="0.001" name="Normalization" scale= "1.0" value="1.0"/>
</spatialModel>
</source>