JohannesBuchner/PyMultiNest — Issue #4: Plots blowing up for very small confidence intervals 
Author: harpsoe
Created: 2012-02-18 16:29:43+00:00
State: open

When the estimated confidence interval is very small the seems to be numerical problems with calculating some indexes

Global Evidence:
3.796537739683588e+01 +- 1.166964614087022e-01
Traceback (most recent call last):
File "ttv.py", line 56, in
p.plot_conditional(i, None, with_ellipses = True, with_points = False)
File "/home/andor/pymultinest2/pymultinest/analyse.py", line 186, in plot_conditional
grid_z1[a,b] += values[i]
IndexError: index (95) out of range (0<=index<40) in dimension 0

In this part of the code:

for i in range(len(values)):
a = int((dim1_column[i] - min1) * (n - 1) / (max1 - min1))
if dim2 is not None:
b = int((dim2_column[i] - min2) * (m - 1) / (max2 - min1))
else:
b = 0
grid_z1[a,b] += values[i]
n_z1[a,b] += 1

It seems that if max1 and min1 are very close, the calculation blows up and gives a's outside the range of a.