Closed segasai closed 2 years ago
This 84ba36f3a698c267fdebccaecead8c83953a0533 provides a fix (the commit messsage is detailed enough). Basically in the static nested run the logz errors were not estimated using a full calculation of the quadratic estimator. (and since the logz errors depends on the H values which can only be computed with the full run (but not incrementally), the errors could be incorrect. This was the reason why previously, i.e. here https://github.com/joshspeagle/dynesty/blob/4c6a9ce67cb9e72d41edae2ed4994d879a2c946f/demos/Examples%20--%20LogGamma.ipynb the uncertainties on logz were not correct and had to be estimated using resample_run.
The issue was caused by the presence of -1e300 among log(likelihood), which broke the default incremental calculation. The commit 4352be9e1c27b9893ba48509aea1882565817108 applies the fix to the dynamic sampler, and the 8e00b304f8c3ddce4d155b3ad9b0daeaf505daf1 adds a test to prevent the error from reoccuring.
While rerunning the notebooks I noticed that for the exponential wave model we occasionally produce very large logzerr of 10^51.
This error has been there since at least d16e716e1791efab859349d0363aff9fd8af88fa (so it's not caused by the logz calculation refactorings)
The code is below
I'm investigating the cause of this, but I thought I'd create an issue to make sure it's not forgotten.