Exemple #1
0
                int_HMF2.M.copy(), int_HMF2.zarr[zbins], param_vals2)[-1, -1])

    #pl = Plotter()
    #pl.add(np.log10(int_HMF.M200[:,zbins]),np.log10(int_HMF.dn_dM(int_HMF.M200,200)[:,zbins]*int_HMF.M200[:,zbins]),color='b',alpha=0.9)
    #pl.add(np.log10(int_HMF2.M200[:,zbins]),np.log10(int_HMF2.dn_dM(int_HMF2.M200,200)[:,zbins]*int_HMF2.M200[:,zbins]),color='r',alpha=0.9)
    #pl.add(np.log10(int_HMF.M200[:,zbins]),np.log10(dn_dzdm_int(int_HMF.zarr[zbins],np.log10(int_HMF.M.copy()))[:,0]*int_HMF.M200[:,zbins]),linestyle='--',color='g',alpha=0.9)
    #pl.add(np.log10(int_HMF2.M200[:,zbins]),np.log10(dn_dzdm_int2(int_HMF2.zarr[zbins],np.log10(int_HMF2.M.copy()))[:,0]*int_HMF2.M200[:,zbins]),linestyle='--',color='c',alpha=0.9)
    #pl.done("test_MF.png")

    #print np.log10(dn_dzdm_int(int_HMF.zarr[zbins],np.log10(int_HMF.M.copy()))[:,0]*int_HMF.M200[:,zbins])

    print(
        "MF interp check",
        np.sum(
            np.log10(
                int_HMF.dn_dM(int_HMF.M200, 200)[:, zbins] *
                int_HMF.M200[:, zbins]) - np.log10(
                    dn_dzdm_int(int_HMF.zarr[zbins], np.log10(
                        int_HMF.M.copy()))[:, 0] * int_HMF.M200[:, zbins])))

    print(int_HMF.zarr[zbins])

    start = time.time()
    print(CL.lnlike(parvals, parlist))  #,priorvals,priorlist)
    print("like call", time.time() - start)
    print("prior", CL.lnprior(parvals, parlist, priorvals, priorlist))
    #print "Prob",CL.lnprob(parvals,parlist,priorvals,priorlist)

    start = time.time()
    print(CL.lnlike(parvals2, parlist))  #,priorvals,priorlist)
    print("like call", time.time() - start)
Exemple #2
0
    print(old_div(Y[-1,-1],Ytilde[-1,-1]))
    print(np.log(old_div(Y[-1,-1],Ytilde[-1,-1])))
    #print -1.*(np.log(Y[-1,30:35]/Ytilde[-1,30:35]))

    print("P of Y", CL.P_Yo(np.outer(np.ones(len(int_HMF.M.copy())),CL.LgY),int_HMF2.M.copy(),int_HMF2.zarr[zbins],param_vals2)[-1,-1])

    #pl = Plotter()
    #pl.add(np.log10(int_HMF.M200[:,zbins]),np.log10(int_HMF.dn_dM(int_HMF.M200,200)[:,zbins]*int_HMF.M200[:,zbins]),color='b',alpha=0.9)
    #pl.add(np.log10(int_HMF2.M200[:,zbins]),np.log10(int_HMF2.dn_dM(int_HMF2.M200,200)[:,zbins]*int_HMF2.M200[:,zbins]),color='r',alpha=0.9)
    #pl.add(np.log10(int_HMF.M200[:,zbins]),np.log10(dn_dzdm_int(int_HMF.zarr[zbins],np.log10(int_HMF.M.copy()))[:,0]*int_HMF.M200[:,zbins]),linestyle='--',color='g',alpha=0.9)
    #pl.add(np.log10(int_HMF2.M200[:,zbins]),np.log10(dn_dzdm_int2(int_HMF2.zarr[zbins],np.log10(int_HMF2.M.copy()))[:,0]*int_HMF2.M200[:,zbins]),linestyle='--',color='c',alpha=0.9)
    #pl.done("test_MF.png")

    #print np.log10(dn_dzdm_int(int_HMF.zarr[zbins],np.log10(int_HMF.M.copy()))[:,0]*int_HMF.M200[:,zbins])

    print("MF interp check", np.sum(np.log10(int_HMF.dn_dM(int_HMF.M200,200)[:,zbins]*int_HMF.M200[:,zbins]) - np.log10(dn_dzdm_int(int_HMF.zarr[zbins],np.log10(int_HMF.M.copy()))[:,0]*int_HMF.M200[:,zbins])))

    print(int_HMF.zarr[zbins])
    
    start = time.time()
    print(CL.lnlike(parvals,parlist))#,priorvals,priorlist)
    print("like call", time.time() - start)
    print("prior",CL.lnprior(parvals,parlist,priorvals,priorlist))
#print "Prob",CL.lnprob(parvals,parlist,priorvals,priorlist)
    
    start = time.time()
    print(CL.lnlike(parvals2,parlist))#,priorvals,priorlist)
    print("like call", time.time() - start)
    print("prior",CL.lnprior(parvals2,parlist,priorvals,priorlist))
#print "Prob",CL.lnprob(parvals2,parlist,priorvals,priorlist)