This is work completed at the Cool Stars 19 Hack Day, see this GitHub Issue for a dialog about the task:

https://github.com/iancze/Starfish/issues/68


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]:
(40, 20, 18)

In [10]:
ws[10,-1,:]


Out[10]:
array([  4.10426976e+03,   3.77381944e+00,   2.81308198e-02,
         1.12586961e+01,   2.74574457e+01,  -9.10558545e-01,
         3.09799772e+03,   3.78588885e+00,   2.49433812e-02,
         1.97781226e+01,   3.07012544e+01,  -8.88208013e-01,
        -1.88228923e-04,  -1.61046190e-04,   1.30077913e-03,
         1.01545858e+00,  -1.99966885e+00,   2.10995105e+01])

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...