Updated about 11 years ago by Deil Christoph

CTA on-off fitting

To implement the standard HESS analysis in GammaLib, on-off fitting should be supported. On-off fitting means that the off data are fit simultaneously to the on data. The relevant mathematics can be found in Mathieu_OnOffFitter.pdf. An good reference that has the relevant formulae we can cite in the documentation is Mathieu de Naurois’s habilitation thesis .

For the moment, GammaLib only supports fitting on models without any uncertainties.

Where to put the off data

The first question is: where should we put the off data.

One natural place would be GCTAObservation, in parallel with the data. We could add a pointer for off events to GCTAObservation. If the pointer is NULL, the original method is used. If the data-cube exists, a modified likelihood formula is used that takes into account the off-data.

We just have to think a little bit more about how we fiddle the off counts normalization factor into all this. Somehow, we have to add the parameter to the model. Maybe we have to add an “off model” to our model container, and then establish a machanism that maps from a off model to a specific off data-cube.

Alternatively, the off-data could simply come with the model. This model would be of type GDataModel. However, it would be a little complicated to have the on data defined in the observation, while the off data are defined in the model.

Maybe a hybrid approach would be the best: having an GCTAModelOff or similar to describe the background, and loading the relevant file into GCTAObservation.

Note, however, that there is some similarity with having an acceptance model (see action #569). Here we want to feed a map cube as background model to the fitter. Again, do we want to have the acceptance model specified in the model, or in the observation.

We probably could solve both by introducing a GCTAModelBackground class that handles map cubes. Note that a map cube could be a spectrum (a sky cube with a single pixel)! We could then load the background model directly in the observation, and handle the rest by the model. Just, the simple logic discussed about (with the NULL pointer) won’t work, as the acceptance model will be exact (is this true?), while the off data will have noise.

Mathieu_OnOffFitter.pdf - Mathematics of on-off fitting (535 KB) Preview Knödlseder Jürgen, 10/15/2012 04:04 PM

Also available in: PDF HTML TXT