Action #808

Feature #692: Perform an extensive interface review of all classes

Support also non-factorized sky models.

Added by Knödlseder Jürgen over 11 years ago. Updated almost 11 years ago.

Status:ClosedStart date:01/12/2013
Priority:UrgentDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-Estimated time:20.00 hours
Target version:00-08-00
Duration:

Recurrence

No recurrence.

History

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

  • Priority changed from Normal to Urgent
  • Estimated time set to 20.00
  • Remaining (hours) set to 20.0

While reworking the model module interfaces (see #773), I recognized that GModelSpatialDiffuseCube is not a spatial model component but a spatio-spectral model component. This could not be used in the actual scheme, as all interfaces are defined for factorized sky models. See the discussion at https://cta-redmine.irap.omp.eu/issues/773#note-10.

The interfaces should be re-considered so that also non-factorized sky models are supported. It would be nice if GModelSky could achieve this, without introducing derived classes for different sky models. So although the sky model should be composed of components, the interfaces should not reflect the factorization.

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

  • Assigned To set to Knödlseder Jürgen

The problem can be resolved by passing all true attributes (GSkyDir, GEnergy, GTime) as arguments to the three model component eval methods. The model is still factorizes, but now in a generic way. The component separation is now per unit.

Argument passing should be done using the GPhoton class, which allows transparent evolution of the interface (e.g. when polarization needs to be added).

The GModelSky::value and GModelSky::gradient should also take GPhoton as argument, the same is true for the GModelSpatial::eval, GModelSpatial::eval_gradients, GModelSpectral::eval, GModelSpectral::eval_gradients, GModelTemporal::eval and GModelTemporal::eval_gradients methods.

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

  • Status changed from New to In Progress

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

The idea is nice for model evaluation, however it’s a nightmare for implementation of the MC method. How to implement a reliable and general MC method for dependent variables? This can probably only be resolved using a rejection method ...

So what argument should the mc methods return? GPhoton (knowing that we cannot really set it?)

#5 Updated by Knödlseder Jürgen over 11 years ago

Jürgen Knödlseder wrote:

The idea is nice for model evaluation, however it’s a nightmare for implementation of the MC method. How to implement a reliable and general MC method for dependent variables? This can probably only be resolved using a rejection method ...

So what argument should the mc methods return? GPhoton (knowing that we cannot really set it?)

I guess I solved this issue by redefining how GModelSky now factorizes the model. See GModelSky for more information on this. Still needs validation.

This does not strictly solve the problem with the actual implementation of the map cube (inherited from Fermi), but it should provide a reasonable workaround.

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

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 20.0 to 0.0

The diffuse map cube has now been implemented (see #576), hence this action can be considered as solved.

Also available in: Atom PDF