diff --git a/inst/cta/src/GCTAResponse.cpp b/inst/cta/src/GCTAResponse.cpp index 8fa3260..b6f666b 100644 --- a/inst/cta/src/GCTAResponse.cpp +++ b/inst/cta/src/GCTAResponse.cpp @@ -985,7 +985,7 @@ double GCTAResponse::irf_radial(const GEvent& event, // Integrate over zenith angle GIntegral integral(&integrand); - integral.eps(m_eps); + integral.eps(1.0e-5); irf = integral.romb(rho_min, rho_max); // Compile option: Check for NaN/Inf @@ -1153,7 +1153,7 @@ double GCTAResponse::irf_elliptical(const GEvent& event, // Integrate over zenith angle GIntegral integral(&integrand); - integral.eps(m_eps); + integral.eps(1.0e-5); irf = integral.romb(rho_min, rho_max); // Compile option: Check for NaN/Inf @@ -1496,6 +1496,7 @@ double GCTAResponse::npred_radial(const GSource& source, // Integrate over theta GIntegral integral(&integrand); + integral.eps(1.0e-5); npred = integral.romb(rho_min, rho_max); // Compile option: Show integration results @@ -1656,6 +1657,7 @@ double GCTAResponse::npred_elliptical(const GSource& source, // Integrate over theta GIntegral integral(&integrand); + integral.eps(1.0e-5); npred = integral.romb(rho_min, rho_max); // Compile option: Show integration results @@ -1822,7 +1824,7 @@ double GCTAResponse::npred_diffuse(const GSource& source, // Integrate over theta GIntegral integral(&integrand); - integral.eps(1.0e-4); + integral.eps(1.0e-5); npred = integral.romb(0.0, roi_psf_radius); // Compile option: Show integration results @@ -2068,7 +2070,7 @@ double GCTAResponse::npsf(const GSkyDir& srcDir, // Setup integration GIntegral integral(&integrand); - integral.eps(m_eps); + integral.eps(1.0e-5); // Radially integrate PSF. In case that the radial integration // region is small, we do the integration using a simple diff --git a/inst/cta/src/GCTAResponse_helpers.cpp b/inst/cta/src/GCTAResponse_helpers.cpp index a963ac1..39dd515 100644 --- a/inst/cta/src/GCTAResponse_helpers.cpp +++ b/inst/cta/src/GCTAResponse_helpers.cpp @@ -339,6 +339,7 @@ double cta_npred_radial_kern_rho::eval(const double& rho) // Integrate over phi GIntegral integral(&integrand); + integral.eps(1.0e-5); npred = integral.romb(omega_min, omega_max) * sin_rho * model; // Debug: Check for NaN @@ -643,6 +644,7 @@ double cta_npred_elliptical_kern_rho::eval(const double& rho) // Integrate over phi GIntegral integral(&integrand); + integral.eps(1.0e-5); npred = integral.romb(omega_min, omega_max) * sin_rho; // Debug: Check for NaN @@ -966,7 +968,7 @@ double cta_npred_diffuse_kern_theta::eval(const double& theta) // Integrate over phi GIntegral integral(&integrand); - integral.eps(1.0e-4); + integral.eps(1.0e-5); npred = integral.romb(0.0, gammalib::twopi) * sin_theta; // Debug: Check for NaN