Bug in PowerLaw prior `lnprob` method
There is a bug in the lnprob
method of the PowerLaw
prior. I think it should probably be something like:
def lnprob(self, val):
in_prior = (val >= self.minimum) & (val <= self.maximum)
if self.alpha == -1:
normalising = 1./np.log(self.maximum/self.minimum)
else:
normalising = (1 + self.alpha) / (self.maximum ** (1 + self.alpha)
- self.minimum ** (1 + self.alpha))
return (self.alpha * np.log(val) + np.log(normalising)) * in_prior
Edited by Matthew Pitkin