Commit e7c83368bcbab085c06a0c704e3df50bf0db6c8f

Authored by Jürgen Knödlseder
1 parent f8c9f87f

Add an additional transition point to the stacked elliptical integration.

This improves convergence, but there is not real justification for that except that it will likely improve the precision of the computations.
inst/cta/src/GCTAResponseCube.cpp
... ... @@ -1245,6 +1245,16 @@ double GCTAResponseCube::psf_elliptical(const GModelSpatialElliptical* model,
1245 1245 bounds.push_back(rho_min);
1246 1246 bounds.push_back(rho_max);
1247 1247  
  1248 + // Kluge: add this transition point as this allows to fit the test
  1249 + // case without any stalls. Not clear why this is the case, maybe
  1250 + // simply because the rho integral gets cut down into one more
  1251 + // sub-interval which may increase precision and smoothed the
  1252 + // likelihood contour
  1253 + double transition_point = delta_max - rho_obs;
  1254 + if (transition_point > rho_min && transition_point < rho_max) {
  1255 + bounds.push_back(transition_point);
  1256 + }
  1257 +
1248 1258 // If the integration range includes the semiminor boundary, then
1249 1259 // add an integration boundary at that location
1250 1260 if (semiminor > rho_min && semiminor < rho_max) {
... ...