Modified GRAD_WINDOW_LENGTH calculation for sooner calculation of valid...
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 tonp.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, whenndim <= 3
, as otherwise, the gradient calculation fails (becauseGRAD_WINDOW_LENGTH
becomes too small)
-
- Added docstrings + clear variable names around the calculation of the Gelman-Rubin statistic
Edited by Noah Wolfe