sblunt / orbitize

Orbit-fitting for directly imaged objects
https://orbitize.info
Other
74 stars 43 forks source link

Math error in Gaussian prior? #334

Closed ziyyadali closed 1 year ago

ziyyadali commented 1 year ago

The math for the compute_lnprior function in the Gaussian prior should have a sigma squared.

Current: lnprob = -0.5*np.log(2.*np.pi*self.sigma) - 0.5*((param - self.mu) / self.sigma)**2 Fixed: lnprob = -0.5*np.log(2.*np.pi*self.sigma**2) - 0.5*((param - self.mu) / self.sigma)**2

sblunt commented 1 year ago

Hey Ziyyad! Thanks for opening this issue. Good catch! I'll make this change. It does not affect any existing code because we always assume sigma is constant. I'm just going to remove that first term since it's constant to make the code simpler.