plt.close()

    print
    print '*************************************************************'
    print

if args.cc != 'False':
    cc = ChainConsumer()
    for nd in xrange(0, mc.ndim):  # (0,ndim):
        cc.add_chain(chain[:, :, nd].flatten(), walkers=mc.nwalkers)

    #print(cc.get_latex_table())
    print cc.get_summary()

    print cc.diagnostic_gelman_rubin(threshold=0.05)
    print cc.diagnostic_geweke()
    print
    print '*************************************************************'
    print

x0 = 1. / 150

M_star1_rand = np.random.normal(M_star1, M_star1_err, n_kept)

if 'kepler' in mc.model_list:

    if args.p != 'False' or args.v != 'False':

        plot_dir = dir_output + '/files_plot/'

        if not os.path.exists(plot_dir):
        plt.close()

    print
    print '*************************************************************'
    print

if args.cc != 'False':
    cc = ChainConsumer()
    for nd in xrange(0, mc.ndim):  # (0,ndim):
        cc.add_chain(chain[:, :, nd].flatten(), walkers=mc.nwalkers)

    #print(cc.get_latex_table())
    print cc.get_summary()

    print cc.diagnostic_gelman_rubin(threshold=0.05)
    print cc.diagnostic_geweke()
    print
    print '*************************************************************'
    print

x0 = 1. / 150

M_star1_rand = np.random.normal(M_star1, M_star1_err, n_kept)

if 'kepler' in mc.model_list:

    if args.p != 'False' or args.v != 'False':

        plot_dir = dir_output + '/files_plot/'

        if not os.path.exists(plot_dir):