Fermi Gamma-ray Space Telescope

LAT Background Models

Many analyses of LAT data require models of Galactic diffuse and isotropic emission. Detailed discussion of how the latest Galactic diffuse emission model (available from this Web page) has been developed, and important caveats on its use, is available here. Please refer to the binned or unbinned likelihood analysis tutorials for some examples of how to incorporate theses models into your own Fermi data analysis. Here is a list of IRFs and diffuse models to be used with the various data sets. We have provided the model files for you to download. However, the files for the most recent data release are included in the Fermitools installation (in the $FERMI_DIR/refdata/fermi/galdiffuse/ directory). As a result, it is unlikely that you will need to download each file separately.

For Pass 8, each event class and event type combination has a dedicated IRF and isotropic model. Only a subset are shown here, as examples.

Galactic interstellar
emission model
Event Selection/
IRF Name
Isotropic spectral template
gll_iem_v07.fits
(see below for P8R3 usage notes)
Pass 8 Source (front+back, allPSF, allEDISP)
P8R3_SOURCE_V3
iso_P8R3_SOURCE_V3_v1.txt
Pass 8 Source (front only)
P8R3_SOURCE_V3::FRONT
iso_P8R3_SOURCE_V3_FRONT_v1.txt
Pass 8 Source (back only)
P8R3_SOURCE_V3::BACK
iso_P8R3_SOURCE_V3_BACK_v1.txt
Pass 8 Clean (front+back, allPSF, allEDISP)
P8R3_CLEAN_V3
iso_P8R3_CLEAN_V3_v1.txt
Pass 8 Clean (PSF0)
P8R3_CLEAN_V3::PSF0
iso_P8R3_CLEAN_V3_PSF0_v1.txt
Pass 8 Clean (PSF1)
P8R3_CLEAN_V3::PSF1
iso_P8R3_CLEAN_V3_PSF1_v1.txt
Pass 8 Clean (PSF2)
P8R3_CLEAN_V3::PSF2
iso_P8R3_CLEAN_V3_PSF2_v1.txt
Pass 8 Clean (PSF3)
P8R3_CLEAN_V3::PSF3
iso_P8R3_CLEAN_V3_PSF3_v1.txt
Pass 8 Ultraclean (front+back, allPSF, allEDISP)
P8R3_ULTRACLEAN_V3
iso_P8R3_ULTRACLEAN_V3_v1.txt
Pass 8 Ultraclean (EDISP0)
P8R3_ULTRACLEAN_V3::EDISP0
iso_P8R3_ULTRACLEAN_V3_EDISP0_v1.txt
Pass 8 Ultraclean (EDISP1)
P8R3_ULTRACLEAN_V3::EDISP1
iso_P8R3_ULTRACLEAN_V3_EDISP1_v1.txt
Pass 8 Ultraclean (EDISP2)
P8R3_ULTRACLEAN_V3::EDISP2
iso_P8R3_ULTRACLEAN_V3_EDISP2_v1.txt
Pass 8 Ultraclean (EDISP3)
P8R3_ULTRACLEAN_V3::EDISP3
iso_P8R3_ULTRACLEAN_V3_EDISP3_v1.txt
Pass 8 Ultracleanveto (front+back, allPSF, allEDISP)
P8R3_ULTRACLEANVETO_V3
iso_P8R3_ULTRACLEANVETO_V3_v1.txt
Pass 8 Sourceveto (front+back, allPSF, allEDISP)
P8R3_SOURCEVETO_V3
iso_P8R3_SOURCEVETO_V3_v1.txt
gll_iem_v05_rev1.fit
(see below for usage notes)

gll_iem_v05_rev1.fit (above)
replaces the previous version,
gll_iem_v05.fits
(details below)
Pass 7 Reprocessed Source (front+back)
P7REP_SOURCE_V15
iso_source_v05.txt
Pass 7 Reprocessed Source (front only)
P7REP_SOURCE_V15::FRONT
iso_source_front_v05.txt
Pass 7 Reprocessed Source (back only)
P7REP_SOURCE_V15::BACK
iso_source_back_v05.txt
Pass 7 Reprocessed Clean (front+back)
P7REP_CLEAN_V15
iso_clean_v05.txt
Pass 7 Reprocessed Clean (front only)
P7REP_CLEAN_V15::FRONT
iso_clean_front_v05.txt
Pass 7 Reprocessed Clean (back only)
P7REP_CLEAN_V15::BACK
iso_clean_back_v05.txt
gal_2yearp7v6_v0.fits or
gal_2yearp7v6_trim_v0.fits
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
Pass 7 (V6) Clean (front)
P7CLEAN_V6::FRONT
iso_2yr_p7v6clean_front.txt
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

The Galactic Interstellar Emission Model

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. Detailed discussion of how the latest Galactic diffuse emission models is available here. In particular, Section 5.2 has several caveats regarding the latest model.

  • Caveats related to the use of all the released diffuse models are available from the LAT Caveats page.

PLEASE NOTE: The version of the Interstellar Emission Model for the analysis of Pass 8 data is gll_iem_v07.fits. This model is designed to be used for point source analysis, but is not appropriate for the investigation of medium or large scale diffuse structures within the LAT data. The interstellar emission model is a large file. For some computers this can produce memory-related issues when running tools that use this model, such as gtlike, gtsrcprob, gtdiffrsp, and gtsrcmaps.

Isotropic Spectral Templates

The LAT data contain a significant background contribution from extra-galactic diffuse gamma-rays, unresolved extra-galactic sources, and residual (misclassified) cosmic-ray emission. This emission is isotropic in nature and should be included as an isotropic spectral template in most analysis. The templates are derived from a fit to the all-sky emission excluding the Galactic plane (|b|<10 deg excluded) and regions around the Celestial poles (|Dec|>60 deg excluded). This is to reduce contamination from the bright Galactic diffuse emission and emission from the Earth's limb. The templates are derived in the energy range from 30 MeV to 1 TeV and then extrapolated as a power-law to 3 TeV. The isotropic spectral template should be used with the same Galactic diffuse model, event class, and event type selection that were used to derive it. The full set of isotropic models are in the $(FERMI_DIR)/refdata/fermi/galdiffuse/ directory. The columns in each isotropic template are: the central energy (in MeV) for the band, the differential flux in that band (in ph/cm2/s/MeV/sr), and, if included, the 1-sigma uncertainty on the differential flux. The uncertainty is not used for likelihood analysis by the Fermitools. Note that the isotropic spectral templates are derived using the latest available catalog at the time of release. It therefore includes, at least partially, emission from sources that may be resolved if a bigger dataset is used.

Updating your XML files

Both the isotropic and Galactic diffuse models are provided within the Fermitools release in the "$(FERMI_DIR)/refdata/fermi/galdiffuse/" directory. 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.

NOTE: It is important that you keep the "source name" tags consistent within your XML models. The Pass 8 data files have been delivered without the diffuse response columns having been populated. As a result, you will need to run the gtdiffrsp tool before performing any unbinned analysis method (such as gtfindsrc or gtsrcprob). If you change the "source name" in the XML file, the tool calculating the exposure will not be able to tell that gtdiffrsp has been run, and will recalculate the diffuse responses, significantly increasing your processing time.

An example of the correct XML for these models is:

<source_library title="source library">

<source name="iso_P8R3_SOURCE_V3_v1" type="DiffuseSource">
<spectrum apply_edisp="false" file="$(FERMI_DIR)/refdata/fermi/galdiffuse/iso_P8R3_SOURCE_V3_v1.txt" type="FileFunction">
<parameter free="1" max="10" min="0.01" 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="gll_iem_v07" type="DiffuseSource">
<spectrum type="PowerLaw">
<parameter free="1" max="10.0" min="0.0" name="Prefactor" scale="1.0" value= "1.0"/>
<parameter free="0" max="1" min="-1" name="Index" scale="1.0" value= "1.0"/>
<parameter free="0" max="1e6" min="2e1" name="Scale" scale="1.0" value= "100"/>
</spectrum>
<spatialModel file="$(FERMI_DIR)/refdata/fermi/galdiffuse/gll_iem_v07.fit" 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 "make4FGLxml.py" (available here). You will also need the current LAT catalog file, and (optionally) the current archive of extended sources. A sample call that includes one extended source is:

prompt> make4FGLxml.py $(PATH_TO_CATALOG)/gll_psc_v24.fit $(PATH_TO_DATA_FILE)/data_filename.fits --outputxml model_filename.xml
--galfile $(FERMI_DIR)/refdata/fermi/galdiffuse/gll_iem_v07.fit --galname gll_iem_v07
--isofile $(FERMI_DIR)/refdata/fermi/galdiffuse/iso_P8R3_SOURCE_V3_v1.txt
--isoname iso_P8R3_SOURCE_V3_v1 --extDir $(FERMI_DIR)/data/pyBurstAnalysisGUI/templates
This is make4FGLxml version 01.
Creating file and adding sources from 4FGL
Extended source CenA Lobes in ROI, make sure $(FERMI_DIR)/data/pyBurstAnalysisGUI/templates/CenALobes.fits is the correct path to the extended template.
Added 311 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

This tool has a number of options available to you. Review the usage notes for more information.

REMINDER: Unlike previous data releases, for the initial Pass 8 data release the diffuse responses have not been pre-calculated. As a result, you will need to run the gtdiffrsp tool as part of any unbinned likelihood analysis.

Disabling Energy Dispersion

For certain data set, the user may chose to enable the handling of energy dispersion effects at low energies. In these cases, you will need to disable the energy dispersion correction for any model components that have already been corrected for energy dispersion or were fit to the data without taking energy dispersion into account. This is the case for the isotropic templates.

The method for disabling energy dispersion handling for a specific source, is to add an attribute to the XML model for that source. This attribute, apply_edisp="false", should be included in the <spectrum> tag of the model for the source which should NOT have the energy dispersion corrections applied.

An example of the correct XML for a source with energy dispersion handling disabled is:

<source name="iso_P8R3_SOURCE_V3_v1" type="DiffuseSource">
<spectrum file="iso_P8R3_SOURCE_V3_v1.txt" type="FileFunction" apply_edisp="false">
<parameter free="1" max="10" min="1e-2" 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>

Including Extended Sources in your Model

Performing an integration over a spatial map requires a different technique than is used for point sources. As a result, you will need to include an attribute in the XML code for an extended source, telling the Fermitools to use the map-based integration method. This attribute, map_based_integral="true", should be included in the <spatialModel> tag of the model for the extended source.

An example of the correct XML for an extended source model is:

<source_library title="source library">

<source name="W44" type="DiffuseSource">
<spectrum normPar="norm" type="LogParabola">
<parameter free="1" max="100000" min="1e-05" name="norm" scale="1e-11" value="2.891247798"/>
<parameter free="1" max="5" min="0" name="alpha" scale="1" value="2.399924084"/>
<parameter free="1" max="5" min="-1" name="beta" scale="1" value="0.2532196784"/>
<parameter free="0" max="300000" min="20" name="Eb" scale="1" value="1737.352167"/>
</spectrum>
<spatialModel file="$(FERMI_DIR)/data/pyBurstAnalysisGUI/templates/W44.fits" map_based_integral="true" type="SpatialMap">
<parameter free="0" max="1000" min="0.001" name="Prefactor" scale="1" value="1"/>
</spatialModel>
</source>

</source_library>

Using the Earth Limb Template

The Third LAT catalog 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 300 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 4-year data set because the residual earth limb emission depends on the orientation of the LAT.

NOTE: For Pass 8 data analysis, the LAT team recommends using a 90° zenith cut to remove Earth limb photons, rather than using the Limb template. This has also changed their recommendation for how to apply the zenith cut to your data. See the Data Preparation section of the Cicerone for the latest recommendations.

The Earth limb template is the only all-sky model component to use files for both the spatial and spectral models. In general, if you follow the zenith angle recommendations from the LAT team, you will not need to include the Earth Limb template in your analysis. This template is intended for use only for analysis of the 4-year Pass 7 reprocessed dataset used in the Third LAT catalog. To include the Earth limb in your analysis, download the model files from the Third 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_4years.txt" type="FileFunction">
<parameter free="1" max="1000" min="1e-05" name="Normalization" scale="1" value="1" />
</spectrum>
<spatialModel file="$(PATH_TO_FILES)/limb_4years.fits" type="SpatialMap">
<parameter free="0" max="1000.0" min="0.001" name="Normalization" scale= "1.0" value="1.0"/>
</spatialModel>
</source>