Skip to content

Instantly share code, notes, and snippets.

@dfm
Last active December 14, 2015 05:08
Show Gist options
  • Select an option

  • Save dfm/5032791 to your computer and use it in GitHub Desktop.

Select an option

Save dfm/5032791 to your computer and use it in GitHub Desktop.
import bart
# Initialize a planet.
planet = bart.Planet(r=0.01, a=21.3, t0=3.85)
planet.parameters += [bart.parameters.Parameter(r"$r$", "r"),
bart.parameters.LogParameter(r"$a$", "a")]
# Initialize the star.
ldp = bart.kepler.fiducial_ldp(teff=6438, logg=4.28, feh=0.0)
star = bart.Star(mass=planet.get_mstar(12.4138), ldp=ldp)
# Set up the system.
system = bart.PlanetarySystem(star)
system.parameters.append(bart.parameters.CosParameter(r"$i$", "iobs"))
system.add_planet(planet)
# Add data and fit.
system.add_dataset(bart.KeplerDataset("path/to/kepler/data/lc.fits"))
system.fit(2000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment