Closed afeldmei closed 6 years ago
Thanks! Turns out I hadn't tested the code where 2 parameters had their starting positions scatter outside the prior boundaries- Thanks for catching it! This should be fixed in 97a11f2f3d1abd4, where I've added a function called check_walker_starting_positions
to SpectralFitting_functs.py
which does this bounds checking.
Very simply, it just loops through each of the walkers which have bad starting positions and changes them to the prior limit:
walkers_too_low=np.where(p0<bounds[:, 0, None])
walkers_too_high=np.where(p0>bounds[:, 1, None])
for parameter, walker_number in zip(*walkers_too_low):
p0[parameter, walker_number]=bounds[parameter, 0]+10*np.finfo(float).eps
for parameter, walker_number in zip(*walkers_too_high):
p0[parameter, walker_number]=bounds[parameter, 1]-10*np.finfo(float).eps
I'll close this now.
I am running fit_example.py and I get an error message in the part where the code checks the bound values:
I solved it by commenting the line
and inserting the following piece of code
But maybe you know a better way to deal with it? I am not a python expert.