Merge in error-checking from lalsuite version
This merges in the changes requested by @leo-singer in lalsuite!474 (merged). This is mainly related to catching GSL errors when possible in the distance integrator.
Merge request reports
Activity
307 326 log_offset = 0; 308 327 309 328 params.scale = -log_offset; 310 311 { 329 size_t n = 64; 330 double abstol = 1e-8; 331 double reltol = 1e-8; 332 int relaxed=0; 333 do { 312 334 /* Maximum number of subdivisions for adaptive integration. */ 313 static const size_t n = 64; Would you please add to
bayestar_test
a case of interest for your analysis that breaks the old tolerance and subdivision limit?If possible, I would rather keep
n
andreltol
as constants but increase their literal values, because this doubling of the number of subdivisions is very similar to what the qagp integrator itself does.
221 221 const double b = integrand_params->b; 222 222 const int k = integrand_params->k; 223 223 double ret = scale - gsl_pow_2(p / r - 0.5 * b / p); 224 int retval=GSL_SUCCESS; 225 gsl_sf_result result; 226 gsl_error_handler_t *old_handler = gsl_set_error_handler_off(); 227 224 228 if (integrand_params->cosmology) 225 229 ret += log_dVC_dVL(r); 230 retval = gsl_sf_exp_mult_e( - Resolved by John Douglas Veitch
307 326 log_offset = 0; 308 327 309 328 params.scale = -log_offset; 310 311 { 329 size_t n = 64; 330 double abstol = 1e-8; I think it should be removed. The integral can have a large dynamic range, and so an absolute tolerance of
1e-8
may be much too generous. TheDBL_MIN
value is meant to disable the absolute tolerance and terminate based only on the relative tolerance.Edited by Leo P. Singerchanged this line in version 4 of the diff
- Resolved by Leo P. Singer
@john-veitch, this merge request is a year old now. Are you still interested in merging it?