This page describes the Spectral and Spatial Models available for use in gtlike.

Two types of sources can be defined, PointSource and DiffuseSource. Each type of source model is comprised of a spectral and a spatial model component, where each component is made up of several parameters.

Each model parameter has a range of valid values that can be specified, and is described by a set of attributes. The actual value of a given parameter that is used in the calculation is the *value* attribute multiplied by the *scale* attribute. The *value* attribute is what the optimizers see. Using the *scale* attribute is necessary to ensure that the parameters describing the objective function, -log(likelihood) for this application, all have values lying roughly within an order-of-magnitude of each other. The *free* attribute determines whether the parameter will be allowed to be fixed or free in the fitting process.

**NOTE:** Free flag attributes are currently disabled for spatial model parameters since fitting for these parameters has not been implemented (primarily due to the enormous overhead associated with computing the energy-dependent response functions for each source component).

Several spectral functions are available for use with gtlike. For point source spectral models, the units are . For diffuse sources, the units are .

The available point source spectral models are:

- PowerLaw
- BrokenPowerLaw
- PowerLaw2
- BrokenPowerLaw2
- SmoothBrokenPowerLaw
- LogParabola
- ExpCutoff
- BPLExpCutoff
- PLSuperExpCutoff
- ConstantValue
- Gaussian
- BandFunction
- FileFunction

Example: XML Model Definition

This function has the form:

where the parameters in the XML definition have the following mappings:

- Prefactor =
- Index =
- Scale =

Example: XML Model Definition

This function has the form:

where

- Prefactor =
- Index1 =
- Index2 =
- BreakValue =

Example: XML Model Definition

This function uses the integrated flux as a free parameter rather than the Prefactor:

where

- Integral =
- Index =
- LowerLimit =
- UpperLimit =

**NOTE:** The UpperLimit and LowerLimit parameters are always treated as fixed and, as should be apparent from this definition, the flux given by the Integral parameter is over the range (LowerLimit, UpperLimit). Use of this model allows the errors on the integrated flux to be evaluated directly by likelihood, obviating the need to propagate the errors if one is using the PowerLaw form.

Example: XML Model Definition

Similar to PowerLaw2, the integral flux is the free parameter rather than the Prefactor:

where

and

- Integral =
- Index1 =
- Index2 =
- BreakValue =
- LowerLimit =
- UpperLimit =

Example: XML Model Definition

where

- Prefactor =
- Index1 =
- Scale =
- Index2 =
- BreakValue =
- beta =

Example: XML Model Definition

This is typically used for modeling Blazar spectra.

where

- norm =
- alpha =
- beta =
- Eb =

Example: XML Model Definition

An exponentially cut-off power-law used for modeling blazar spectra subject to absorption by the extragalactic background light (EBL).

where

- Prefactor =
- Index =
- Scale =
- Ebreak =
- P1 =
- P2 =
- P3 =

Example: XML Model Definition

An exponentially cut-off broken power-law.

where

- Prefactor =
- Index1 =
- Index2 =
- BreakValue =
- Eabs =
- P1 =

Example: XML Model Definition

For modeling pulsars.

where

- Prefactor =
- Index1 =
- Scale =
- Cutoff =
- Index2 =

Example: XML Model Definition

A constant-valued function, independent of energy.

where

- Value =

Example: XML Model Definition

A Gaussian function that can be used to model an emission line.

where

- Prefactor =
- Mean =
- Sigma =

Example: XML Model Definition

This function is used to model GRB spectra.

where

- norm =
- alpha =
- beta =
- Ep =

Example: XML Model Definition

A function defined using an input ASCII file with columns of energy and differential flux values. The energy units are assumed to be MeV and the flux values are assumed to for a point source and for a diffuse source. The sole parameter is a multiplicative normalization.

where

- Normalization =

**NOTE:** Free flag attributes are currently disabled for spatial model parameters since fitting for these parameters has not been implemented (primarily due to the enormous overhead associated with computing the energy-dependent response functions for each source component).

Four spatial models are available:

**SkyDirFunction**- describes a direction on the sky and is used only for point sources.**ConstantValue**- provides a constant value regardless of what argument value it takes. (In the current context, ConstantValue is used to model the isotropic diffuse emission. As a function, however, ConstantValue is fairly general and can even be used in a spectral model; as it is when the spatial model is a MapCubeFunction.)**SpatialMap**- uses a FITS image file as a template for determining the distribution of photons on the sky. (XML Example)**MapCubeFunction**- used for diffuse sources that are modeled by a 3 dimensional FITS map (two sky coordinates and energy), thereby allowing arbitrary spectral variation as a function of sky position. (XML Example)

Last updated by: Elizabeth Ferrara - 02/05/2010