Fermi Gamma-ray Space Telescope

Model Selection

The models used by the Science Tools are stored in XML files. XML (short for eXtensible Markup Language) is a language to define and store data; HTML used to define webpages is a form of XML. XML files are ASCII files full of 'tags' delimited by the < and > symbols.

For historic reasons the Science Tools use two XML formats, one used for parameter fitting (e.g., by the likelihood tool) and the other for source simulation. The likelihood XML format includes parameter uncertainties but does not allow time dependence while the simulation format does; in addition, the simulation format includes source models that are not in the likelihood format.

Creating and Editing Source Models

You could master the syntax to create a model XML file, and indeed occasionally you might find it convenient to edit an existing XML file. However, a GUI-driven tool called ModelEditor is included in the Science Tools. This tool is invoked at the command line, and its use is fairly intuitive. ModelEditor can read and write XML files of both formats. Here we point out fundamental features of this tool, focusing on the creation of likelihood XML files.

While you might want to define each source in your Source Region, it is easier to start with a catalog for this region. The obvious choice is the most recent Fermi-LAT catalog. Under 'File' choose 'Extract...' This will open a GUI that allows you to define your Source Region (RA, Dec and radius in degrees), the flux limit, the file with the catalog (the 3EG catalog is the default) and the output file. Remember, the Source Region should be larger than the Region of Interest, the region for which there are counts. You will then be presented with a GUI with a list of selected sources. Selecting a source presents you with the source properties: a position and a spectral model. You can edit these values; for example, the catalog may have assumed the spectrum was a simple power law, but you would like to try a power law with an exponential cutoff. You save the model for a particular source by clicking the 'Set components' button.

Using the pull-down menu you can delete a selected source or add either a diffuse or point source.

The entire source model need not be in the same XML file. The tools accept lists of source XML files, both at the command line and by reading in simple ASCII files listing the XML files.

The model parameters (in the likelihood XML format) have a number of attributes:

  • value—the parameter's value; may be an initial guess or the result of a fit
  • scale—a scale factor for the parameter
  • name—name given to the parameter
  • max—parameter's maximum value
  • min—parameter's minimum value
  • free—whether the parameter should be fit: 0 means the parameter value should be fixed, 1 that it should be fit

Therefore, if the 'value' is '4.3' and the 'scale' is '1e-9,' the actual parameter value is 4.3x10-9.

Spatial Models

You have a choice of four models:

  • SkyDirFunction—a point source
  • ConstantValue—a diffuse source with a constant flux per steradian
  • SpatialMap—a spatially varying diffuse source. The map of the source is provided by a file. The default is the map of the Galactic Diffuse Emission.
  • MapCubeFunction—a 3 dimensional FITS map (two sky coordinates and energy) used to map diffuse emission, thereby allowing arbitrary spectral variation as a function of sky position

Spectral Models

The units for the spectral models are cm-2 s-1 MeV-1 for point sources and cm-2 s-1 MeV-1 sr-1 for diffuse sources. All energies are in MeV.

You have a choice of a number of spectral models. The current, up-to-date list of those models ias available on the Source Models page. Example XML snippets are also available for each of the spectral models, for those who wish to customize the source spectra used to fit the data.

The most commonly used spectral models are:

  • PowerLaw—simple power law.
  • PowerLaw2—simple power law with the integral number of counts between two energies as the normalization.
  • BrokenPowerLaw—two component power law.
  • BrokenPowerLaw2—two component power law, with the integral number of counts between two energies as the normalization.
  • LogParabola—curving function used to model blazars.
  • ExpCutoff—power law with a modified exponential cutoff.
  • BPLExpCutoff—an exponentially cut-off broken power law.
  • Gaussian—function that can model an emission line.
  • ConstantValue—constant-value function.
  • BandFunction—function used to model gamma-ray burst spectra.
  • FileFunction—tabulated function, F(E), with free-floating normalization. The function is provided in an ASCII file with two columns. The first column is the energy in MeV, and the second is the flux (cm-2 s-1 MeV-1 for a point source, cm-2 s-1 MeV-1 sr-1 for a diffuse source).

Diffuse Emission Models

Proper fitting of the source analysis requires simultaneous modeling of the background contribution as well. Both the galactic and extragalactic diffuse emission contribute to this background, and they are modeled separately. Model definitions currently recommended by the LAT team for proper source analysis are described here. These contributions are incorporated in the XML model file in addition to the source models.


» Forward to Calculating Livetime and Exposure
» Back to Choosing the Data to Analyze—Regions of Interest and Source Regions
» Back to the beginning of the likelihood section
» Back to the beginning of the Cicerone