Finish implementation of on-off fitting
- there is no complete unit test that checks the On/Off fitting functionality. Such a test should be added to the
test_CTA.pyscript (there is already a unit test, but it does so far not perform On/Off fitting)
- the computation of the Hessian in
GCTAOnOffObservation::likelihood()looks strange. Could you please write down the intended formula in the documentation (can use LaTeX style), and then check whether the formula is indeed implemented?
GCTAOnOffObservation::compute_alphamethod actually computes the ratio between effective areas, not exposures. Am I correct that it should compute the ratio of exposures? What about the solid angle?
- in the
GCTAOnOffObservation::compute_rmfmethod, if a weighting is done, should it not be done over effective area times livetime? Where is the time coming in? Could you write down the formula in the documentation what the method should be doing? Also, should the
aeffmethod not use true instead of reconstructed energy?
- shoudn’t the
model_off()methods be private (it’s always simpler to make a private method public when really needed then vice versa)
- are the
#3 Updated by Knödlseder Jürgen over 7 years ago
- Status changed from New to In Progress
- Assigned To changed from Martin Pierrick to Knödlseder Jürgen
I have written down the formulae for the log-likelihood, its derivative and the curvature matrix and have corrected the implementation (there was an error in the mixed curvature matrix elements for background and sky components).
#5 Updated by Knödlseder Jürgen over 7 years ago
- % Done changed from 50 to 70
GCTAOnOffObservation::compute_alpha method should not use the effective area but the background acceptance, as alpha is a correction factor that translates the off-region background to the on-region background. In addition, the correction should include the solid angle of the background region.
The method was corrected accordingly.
#6 Updated by Knödlseder Jürgen over 7 years ago
- % Done changed from 70 to 90
In order to allow loading of On/Off observations from an XML file I needed to modify a bit the way how the background response and the alpha parameters are stored (the information was in fact not written to any file, hence it was missing when analysing an On/Off observation on the basis of an XML file). I added C++ unit tests that check the On/Off observation and that do model fitting on basis of an XML file.
The ARF format allows to store additional columns, and I therefore added the background and alpha vectors as columns “BACKGROUND” and “ALPHA” to the ARF file. This needed some modifications of
GArf so that additional columns are handled.
I furthermore simplified the class interface. Before,
etrue has been specified for response computation while it is better specified during class construction, as is already done for
ereco. In addition, I removed the
compute_response() methods and now do both actions upon construction from a CTA observation. This furthermore assures that things are done consistently. Hence an On/Off observation is now build from a
GCTAObservation object in a single shot.