Change request #1314
TS computation for GModelData should be omitted
Status: | Closed | Start date: | 08/26/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Mayer Michael | % Done: | 100% | |
Category: | - | Estimated time: | 0.50 hour | |
Target version: | 00-08-00 | |||
Duration: |
Description
I tested the new feature to compute TS values with ctlike. For the source models it works quite nicely. However, for the background models, I get meaningless, negative values like TS=-10390.
I assume the fit has problems to adjust the parameters if a background model is missing. The fit considers every event from such a run without background model as pure source photon, which causes problems. Please find attached the printed models with the TS computation flag turned on in ctlike.
I therefore suggest to omit the TS computation for instances of GModelData. Not only that it saves computational time, a background TS value of a background-dominated experiment also doesn’t make too much sense to me. In ctlike, we could achieve that by introducing an 'if’ statement questioning the type of the respective GModel and only proceed with the TS calculation in case a GModelSky is given.
I furthermore noticed that the TS value of a GModelData model (GCTAModelIrfBackground
) is not written out to the optimised xml-file which seems ok if we drop its computation anyway.
Recurrence
No recurrence.
History
#1 Updated by Mayer Michael over 10 years ago
Thinking more about this, I suggest the user should be able to steer for which sources TS values are calculated for. We could extend the hidden parameter tscalc in ctlike
to a string. The input could be “all”, “no”, or a comma-separated list of model names which should be considered in the TS computation.
This would save a large amount of computational time and would simplify e.g. the creation of a TS map (#1323). Do you agree on this?
#2 Updated by Knödlseder Jürgen over 10 years ago
An alternative would be to control this over the XML file. I have no strong opinion about the way it should be done. Anyone has an opinion about that?
#3 Updated by Mayer Michael about 10 years ago
Going via the xml file sounds also good to me. We could add a boolean to GModel
called m_tscalc
, which controls if the TS should be computed in ctlike. This flag can be set via the python interface or in the xml file directly.
If you agree with this approach, I could implement this.
#4 Updated by Mayer Michael about 10 years ago
- Assigned To set to Mayer Michael
- Target version set to 00-08-00
I’ve added #1326 to include such a flag in to GModel.
#5 Updated by Mayer Michael about 10 years ago
- Status changed from New to Pull request
- % Done changed from 0 to 100
- Estimated time set to 0.50
To code is available on branch 1314-TS-computation-from-xml-in-ctlike. It is only working in combination with the gammalib branch from #1326.
#6 Updated by Knödlseder Jürgen about 10 years ago
- Status changed from Pull request to Closed
Merged into devel
branch.