Action #2463

GModelSpatialRadialProfile and GModelSpatialRadialProfileGauss modifications

Added by Cardenzana Josh about 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:04/27/2018
Priority:NormalDue date:
Assigned To:Cardenzana Josh% Done:

100%

Category:-
Target version:1.6.0
Duration:

Description

I'm looking at GModelSpatialRadialProfileGauss as a potentially faster model to compute than GModelSpatialRadialGauss. Comparing the fitting of the two methods, they seem to produce similar results, however there are some features missing in the profile version:
  • GModelSpatialRadialProfileGauss cannot be constructed from a position and a sigma value
  • GModelSpatialRadialProfileGauss missing methods for setting/getting the sigma parameter value
  • GModelSpatialRadialProfile updates all parameters if any spatial parameter changes. This isn’t necessary for the GModelSpatialRadialProfileGauss model (shape is independent of central RA,Dec).
  • There’s a lot of print out statements in the GModelSpatialRadialProfile::cache_index() method, which can be moved into a debug section (or potentially removed entirely?)

Recurrence

No recurrence.

History

#1 Updated by Cardenzana Josh about 6 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90
All the above changes have been made and affect the following files:
  • GModelSpatialRadialProfile (.hpp & .cpp)
  • GModelSpatialRadialProfileGauss (.hpp, .cpp & .i)
  • configure.ac (added '--enable-debug-precomputation’ compile option to turn on precomputation debugging text)

I’m not sure how useful the debugging text is, but I left it in place rather than remove it just in case. All other classes inheriting from GModelSpatialRadialProfile should work in the exact same manner as before, however the GModelSpatialRadialProfileGauss model no longer updates its cache when the RA,Dec parameters of the source change.

The relevant pull branch:
  • GammaLib: joshcardenzana/gammalib/2463-spatialradialprofile_updates

P.S.
There’s another speedup that could be done for the Gaussian profile model. Since the cache is computed at a fixed number of offset intervals (100), it can be computed once for sigma=1, and queried at a given 'offset/sigma’ position afterwards. This means the cache would not have to be updated every time sigma changes. Thoughts?

#2 Updated by Knödlseder Jürgen almost 6 years ago

  • Status changed from Feedback to Pull request
  • Target version set to 1.6.0
  • % Done changed from 90 to 100

The print statements were for debugging only and were removed. It is no longer necessary to have the compile option in configure.ac, I hence remove this option. Now proceeding to merge in the code.

#3 Updated by Knödlseder Jürgen almost 6 years ago

  • Status changed from Pull request to Closed

Merged into devel.

Also available in: Atom PDF