Skip to content

Modified GRAD_WINDOW_LENGTH calculation for sooner calculation of valid...

Noah Wolfe requested to merge noah.wolfe/bilby:master into master

This MR includes two fixes and a little extra documentation for the ptemcee module.

  • Fixes #638 (closed) by setting all numerical negative infinities (< -10^100) in the mean_log_posterior array to np.nan
  • Modified the GRAD_WINDOW_LENGTH over which the gradient of the mean log posterior is calculated to be one of two cases:
    • 2 * ((ndim + 1) // 2) + 1 or
    • 2 * (nwalkers // 2) + 1, the original calculation of this variable in bilby, when ndim <= 3, as otherwise, the gradient calculation fails (because GRAD_WINDOW_LENGTH becomes too small)
  • Added docstrings + clear variable names around the calculation of the Gelman-Rubin statistic
Edited by Noah Wolfe

Merge request reports