Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Mar 11, 2021
1 parent 6345825 commit 14bfdc8
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docs/tutorials/rv.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@
print(Ks, "m/s")
# -

0.5 * (np.log(np.array(periods) + np.array(period_errs)) - np.log(np.array(periods) - np.array(period_errs)))
0.5 * (
np.log(np.array(periods) + np.array(period_errs))
- np.log(np.array(periods) - np.array(period_errs))
)

np.array(period_errs) / np.array(periods)

Expand Down Expand Up @@ -95,13 +98,13 @@
)

# Eccentricity & argument of periasteron
ecs = pmx.UnitDisk("ecs", shape=(2, 2), testval=0.01*np.ones((2, 2)))
ecs = pmx.UnitDisk("ecs", shape=(2, 2), testval=0.01 * np.ones((2, 2)))
ecc = pm.Deterministic("ecc", tt.sum(ecs ** 2, axis=0))
omega = pm.Deterministic("omega", tt.arctan2(ecs[1], ecs[0]))
xo.eccentricity.vaneylen19(
"ecc_prior", multi=True, shape=2, fixed=True, observed=ecc
)
"ecc_prior", multi=True, shape=2, fixed=True, observed=ecc
)

# Jitter & a quadratic RV trend
logs = pm.Normal("logs", mu=np.log(np.median(yerr)), sd=5.0)
trend = pm.Normal("trend", mu=0, sd=10.0 ** -np.arange(3)[::-1], shape=3)
Expand Down Expand Up @@ -198,8 +201,8 @@ def get_rv_model(t, name=""):
import arviz as az

az.summary(
trace, var_names=["trend", "logs", "omega", "ecc", "t0", "logK", "P"]
)
trace, var_names=["trend", "logs", "omega", "ecc", "t0", "logK", "P"]
)
# -

# It looks like everything is pretty much converged here. Not bad for 14 parameters and about a minute of runtime...
Expand Down

0 comments on commit 14bfdc8

Please sign in to comment.