Fermi Science Support Center

LAT Background Models

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 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
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 Diffuse 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. A complete description of the Pass 7 Galactic diffuse model is available.

Isotropic Spectral Templates

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

Updating your XML files

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