Skip to content

Instantly share code, notes, and snippets.

Dan Foreman-Mackey dfm

Block or report user

Report or block dfm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View timedelay.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pymc3-demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View solar-twin.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View star-fit.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View for_megan.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View for_gully.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View time-delay-periodogram.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View time_delay_periodogram.py
import pymc3 as pm
import numpy as np
import exoplanet as xo
import theano.tensor as tt
with pm.Model() as simple_model:
period = pm.Flat("period", testval=10.0)
nu = pm.Flat("nu", testval=15)
View inner_loop.py
import pymc3 as pm
import theano.tensor as tt
Ks=np.array([8.0,2.15])
with pm.Model() as model:
# Common "shared" orbital parameters
logK = pm.Uniform("logK",lower=np.log(0.5), upper=np.log(100.0), testval=np.log(Ks), shape=2)
View loglike.py
import numpy as np
from scipy.linalg import cho_factor, cho_solve
cov = ...
factor = cho_factor(cov)
logdet = 2*np.sum(np.log(np.diag(factor[0])))
loglike0 = logdet + cov.shape[0] * np.log(2*np.pi)
def like(x, datasets, loglike0, factor, length, c_raw):
ndata = datasets.shape[1]
You can’t perform that action at this time.