In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from isochrones.dartmouth import Dartmouth_Isochrone
from isochrones.starmodel import BinaryStarModel, StarModel
from isochrones.starmodel import TripleStarModel
dar = Dartmouth_Isochrone()
Example: A known EB KIC 6778289, or WISE J192824.57+421508.1 (http://keplerebs.villanova.edu/overview/?k=6778289)
In [2]:
mags = dict( W1=(11.808,0.022), W2=(11.834,0.021), W3=(11.675,0.170),
J=(12.119,0.021), H=(11.913,0.017), K=(11.873,0.019))
mod1 = StarModel(dar, maxAV=0.5, **mags)
mod2 = BinaryStarModel(dar, maxAV=0.5, **mags)
mod3 = TripleStarModel(dar, maxAV=0.5, **mags)
In [13]:
#mod1.fit_mcmc()
#mod2.fit_mcmc()
mod3.fit_mcmc(nburn=200, niter=100, nwalkers=300)
Out[13]:
In [4]:
#mod1.triangle_plots();
In [9]:
mod2.triangle_plots();
In [14]:
mod3.triangle_plots();
In [15]:
plt.plot(mod3.sampler.lnprobability.T);
In [8]:
plt.plot(mod2.sampler.lnprobability.T);
In [10]:
mod2.samples['lnprob'].min()
Out[10]:
In [13]:
inds = np.argsort(mod2.sampler.acceptance_fraction)
In [18]:
mod2.sampler.lnprobability.min(axis=1)[inds]
Out[18]:
In [9]:
plt.plot(mod1.sampler.lnprobability.T);
In [31]:
np.sort(mod1.sampler.acceptance_fraction)
Out[31]:
In [ ]: