Ejemplo n.º 1
0
Archivo: load.py Proyecto: dessn/sn-bhm
import os
from dessn.models.d_simple_stan.load import plot_quick

if __name__ == "__main__":
    dir_name = os.path.dirname(__file__)
    std = dir_name + "/stan_output"
    plot_quick(std, "stan_mc", include_sep=False)
Ejemplo n.º 2
0
Archivo: load.py Proyecto: dessn/sn-bhm
    c = ChainConsumer()
    if do_weight:
        c.add_chain(chain, weights=w, name="calib")
    else:
        c.add_chain(chain, name="calib")

    if load_second:
        res2 = load_stan_from_folder(std + "_calib_data_no_calib_model_and_bias", num=0, merge=False, cut=False)
        chain, posterior, _, p, f, l, w, ow = res2[0]

        if do_weight:
            c.add_chain(chain, weights=w, name="nocalib")
        else:
            c.add_chain(chain, name="nocalib")
    c.plot(filename="output.png", truth=t, figsize=0.75)

    # c = ChainConsumer()
    # c.add_chain(chain, name="approx")
    # c.add_chain(chain, weights=w, name="full")
    # c.plot(filename="output.png", truth=t)

if __name__ == "__main__":
    dir_name = os.path.dirname(__file__)
    std = dir_name + "/stan_output"
    plot_quick(std, "approx", include_sep=False)
    # plot_all_weight(std, dir_name + "/plot_approx_weight.png")
    #for i in range(20):
    #    plot_single_cosmology_weight(std, dir_name + "/plot_approx_single_weight_%d.png" % i, i=i)
    # debug_plots(std)