New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow an upper limit on the eccentricity distribution #96
Comments
It does look like part of my problem is an upstream issue, e.g. with pm.Model():
bound_beta = pm.Bound(pm.Beta, upper=0.3)
bound_beta('ex', alpha=1.12, beta=3.09, testval=0.01,)
trace = pm.sample() fails with SamplingError: Bad initial energy |
Adding a lower bound to with pm.Model():
bound_beta = pm.Bound(pm.Beta, lower=0., upper=0.3)
bound_beta('ex', alpha=1.12, beta=3.09, testval=0.01)
trace = pm.sample() I tested this on my system without the bad initial energy error. |
Thanks @jiayindong that does fix that issue. So I think I could get most of what I want by defining my own eccentricity distribution function rather than using xo.eccentricity.kipping13. |
Great! If you want to consider uncertainties on alpha and beta instead of the medians, alpha_mu = 1.12
alpha_sd = 0.1
beta_mu = 3.09
beta_sd = 0.3
with pm.Model():
bounded_normal = pm.Bound(pm.Normal, lower=0.)
alpha = bounded_normal("alpha", mu=alpha_mu, sd=alpha_sd, testval=alpha_mu)
beta = bounded_normal("beta", mu=beta_mu, sd=beta_sd, testval=beta_mu)
ecc = pm.Bound(pm.Beta, lower=0., upper=0.3)('ecc', alpha=alpha, beta=beta)
trace = pm.sample() adopted from xo.eccentricity.kipping13. |
perfect, thanks! |
Thanks @jiayindong! @mrtommyb: it looks like the other error you were finding was also caused by a missing Either way, it was easy enough to add so I pushed this feature. |
Is your feature request related to a problem? Please describe.
I would like to include an upper limit on the eccentricity (a physical motivation for this could be to prevent crossing orbits
Describe the solution you'd like
Ideally the function call would be
or
Describe alternatives you've considered
I tried several methods to implement solutions including:
but this fails with
The text was updated successfully, but these errors were encountered: