Feature #988

Support GCTAModelBackground in ctobssim

Added by Mayer Michael over 10 years ago. Updated over 10 years ago.

Status:ClosedStart date:11/18/2013
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:-
Duration:

Description

Analysing arbitrary models as background for CTA will be available in gammalib (https://cta-redmine.irap.omp.eu/issues/576). Accordingly, ctobssim should be able to handle such a model and simulate data with it. One could simply add an if-statement to check wether such a model is given (e.g. at line 876ff of ctobssim). Or, probably more sophisticated, we use a GCTAModelRegistry to check the given type of model.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 10 years ago

  • Status changed from New to In Progress
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 70

I modified ctobssim in the branch 988-support-GCTABackground-in-ctobssim.

I did not need to introduce a registry class or an if-statement, I just added the mc() method to the abstract interface of GModelData. It is then sufficient to make a couple of checks to make sure that indeed a CTA event list has been simulated to make the ctobssim application more general.

I added a unit test to the package that checks the diffuse cube model (I used the same model that is also in gammalib).

I tried fitting with ctlike yet I do not recover the correct normalization (neither when I use ctmodel). Still need to figure out what’s wrong with the normalization ...

#2 Updated by Knödlseder Jürgen over 10 years ago

  • % Done changed from 70 to 100

I finally found the problem. In fact, there is no need to compute an area in the GCTAModelBackground::mc method as the flux is in units of cts/s, i.e. the solid angle integration has already be done in the GModelSpatialDiffuseCube class.

For the radial acceptance model, the area computation is needed because the MC sampling of the spatial model is not done on a normalized model. For the diffuse cube (and the diffuse map), the MC cache implies that the map has been normalized.

#3 Updated by Knödlseder Jürgen over 10 years ago

  • Status changed from In Progress to Feedback

#4 Updated by Knödlseder Jürgen over 10 years ago

Small modifications after rework of GCTARoi and GCTAInstDir classes (see #576).

#5 Updated by Mayer Michael over 10 years ago

Oh yes, of course the integration is not necessary. Thanks for this finding.
Testing this branch now allowed to simulate events from a given FITS-file (also in units per TeV). We might merge this branch with devel as soon as GCTAModelBackground is available in gammalib/devel.

#6 Updated by Knödlseder Jürgen over 10 years ago

  • Status changed from Feedback to Closed

Merged into devel branch.

#7 Updated by Knödlseder Jürgen over 10 years ago

  • Target version deleted (00-06-00)

Also available in: Atom PDF