This is work completed at the Cool Stars 19 Hack Day, see this GitHub Issue for a dialog about the task:
In [1]:
import emcee
In [ ]:
sampler = emcee.EnsembleSampler(nwalkers, ndim, lnprob_all, threads=n_threads)
In [8]:
ws = np.load('/Users/gully/GitHub/welter/sf/m115/output/mix_emcee/run_binary/emcee_chain.npy')
In [9]:
ws.shape
Out[9]:
In [10]:
ws[10,-1,:]
Out[10]:
In [5]:
from matplotlib.ticker import MaxNLocator
In [6]:
label = ["$T_{\mathrm{eff}}$", "$\log{g}$", "$[\mathrm{Fe}/\mathrm{H}]$","$v_z$", "$v\sin{i}$", "$\log{\Omega}$",
"$T_{\mathrm{eff,2}}$", "$\log{g_2}$", "$[\mathrm{Fe}/\mathrm{H}]_2$","$v_{z2}$", "$v\sin{i_2}$",
"$\log{\Omega_2}$","$c^1$", "$c^2$", "$c^3$", "sigAmp", "logAmp", "$l$"]
In [11]:
fig, axes = plt.subplots(18, 1, sharex=True, figsize=(8, 14))
for i in range(0, 18, 1):
axes[i].plot(ws[:, :, i].T, color="k", alpha=0.2)
axes[i].yaxis.set_major_locator(MaxNLocator(5))
axes[i].set_ylabel(label[i])
axes[17].set_xlabel("step number")
fig.tight_layout(h_pad=0.0)
This is just a proof-of-concept. Need to run for many many more samples to converge...