# Page History

## Key

• This line was removed.
• Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

The DRM is the matrix that transforms a binned counts spectrum from true energies to measured energies:

Latex
Wiki Markup
{latex}
$$n_{k^\prime} = \sum_k D_{kk^\prime} n_k \nonumber$$
{latex}

where

Wiki Markup
Latex
{latex}$n_{k^\prime}${latex}
are the counts in measured energy bin
Wiki Markup
Latex
{latex}$k^\prime${latex}
and
Wiki Markup
Latex
$n^k${latex}$n^k${latex}
are the counts in true energy bin
Wiki Markup
Latex
$k${latex}$k${latex}
. The DRM calculation in Likelihood follows that performed in gtrspgen:

Latex
Wiki Markup
{latex}
$$D_{kk^\prime} = \frac{\int d\theta d\phi \left[\int_{\Delta E_{k^\prime}} dE^\prime D(E^\prime; E_k, \theta, \phi)\right] A(E_k, \theta, \phi) lt(\theta, \phi)}{\int d\theta d\phi A(E_k, \theta, \phi) lt(\theta, \phi)} \nonumber$$
{latex}

Here

Wiki Markup
Latex
{latex}$D(E^\prime; E, \theta, \phi$){latex}
is the energy dispersion function,
Wiki Markup
Latex
{latex}$A(E, \theta, \phi)${latex}
is the effective area, and
Wiki Markup
Latex
{latex}$lt(\theta, \phi)${latex}
is the integrated livetime as a function of detector coordinates associated with the specified sky position. sky position.
Latex
Wiki Markup
{latex}$E_k${latex}
is the logarithmic center of the
Wiki Markup
Latex
$k${latex}$k${latex}
th true energy bin. The integral over measured energy is taken over the width of the
Wiki Markup
Latex
{latex}$k^\prime${latex}
th bin.

In principle, the DRM should be evaluated at each sky pixel position in the binned counts map, but we make the approximation that the DRM does not change much over the counts map region and just evaluate it at the map center and assume it applies everywhere on the map. This is supported by these plots of the energy dispersion evaluated at various points on the sky for a one-day survey mode integration:

...

1. To save execution time, the log-likelihood is evaluated using only the pixels that have non-zero data counts (as opposed to model counts). This can be seen in the expression for the Poisson log-likelihood,
Latex
Wiki Markup
{latex}
$$\log{\cal L} = \sum_j \left[n_j\log\theta_j - \theta_j\right] \nonumber$$
{latex}

where
Wiki Markup
Latex
{latex}$n_j${latex}
is the observed count in pixel unmigrated-inline-wiki-markup{
Latex
}$j${latex}
and
Wiki Markup
Latex
{latex}$\theta_j${latex}
is the model counts for that pixel. In the current implementation, this means that model counts are only computed for those non-zero pixels. For sparse datasets (e.g., short integration times or at higher energies), this speeds up the calculation substantially: at least an order of magnitude for 1 day integrations. Applying the DRM to each pixel counts spectrum would require the model calcuation to be made for every pixel in the counts cube, even if it is empty. However, assuming binned analysis is generally used for longer observations, and most pixels are occupied, this may not be a real limitation.
2. A more serious problem is applying the DRM convolution to the true counts spectrum at each pixel location. If the number of energy bins is
Wiki Markup
Latex
{latex}$n_e${latex}
, the convolution is an
Wiki Markup
Latex
{latex}${\cal O}(n_e^2)${latex}
operation. For
Wiki Markup
Latex
{latex}$n_e = 30${latex}
, this results in about a factor of 900 slow down in computing the expected pixel counts that go into the log-likelihood.

Since we need to compute the total predicted counts for each component, we have the total counts spectrum in true energy space (This is easily obtained for each source by integrating each energy plane over angle in the associated source map and multiplying by the spectral function.) We can then convolve the spatially integrated true energy counts spectrum with the DRM to obtain the overall measured energy counts spectrum. We form the ratio of the convolved model counts to unconvolved model counts in each energy bin. When computing the contribution to the log-likelihood from each pixel

Wiki Markup
Latex
$j${latex}$j${latex}
, we multiply the unconvolved model counts for that pixel by the ratio of convolved to unconvolved model counts from the spatially integrated spectrum. This procedure does not really account for any differences in counts spectra that arise from spatial variation of the source spectrum (for diffuse sources), exposure variations across the map region, and the effect of the energy-dependence of the PSF on the counts spectrum (the observed counts spectrum for a point source should be softer near the source location). All of these neglected effects (they may be others I am missing) are ameliorated somewhat by the fact that this procedure has the right local effect, i.e., energy bins on the falling part of the counts spectrum tend to have their count increased while bins on the rising part have their count decreased. This procedure will probably not work very well for sharp spectral features.

...