def test_6df(): like = df6('/home/ekli/myworks/cosmodata/BAO/bao_6dF.txt') for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) cosmo = lcdm(Hth, omm, omk) print("H = %8.3f omm = %8.3f omk = %8.3f" %(Hth, omm, omk), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.distance_DV)) return
def test_ohd(): like = ohd('/home/ekli/myworks/cosmodata/OHD/CC_31.txt') for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) cosmo = lcdm(Hth, omm, omk, feedback=0) print("H = %8.3f omm = %8.3f omk = %8.3f" %(Hth, omm, omk), end=' ') print("rs = %8.3f"%(cosmo.fit_rs_drag()), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.Hofz)) return
def test_dr12(): datfile = '/home/ekli/myworks/cosmodata/BAO/bao_DR12Consensus.txt' probfile = '/home/ekli/myworks/cosmodata/BAO/BAO_consensus_covtot_dM_Hz.txt' like = dr12(datfile, probfile) for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) cosmo = lcdm(Hth, omm, omk) print("H = %8.3f omm = %8.3f omk = %8.3f" %(Hth, omm, omk), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.Hofz, cosmo.distance_DM)) return
def test_jla(): datfile = '/home/ekli/myworks/cosmodata/Pantheon/pantheon_zhel.txt' covfile = '/home/ekli/myworks/cosmodata/Pantheon/pantheon_cov.txt' like = jla(datfile, covfile) for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) cosmo = lcdm(Hth, omm, omk) print("H = %8.3f omm = %8.3f omk = %8.3f" %(Hth, omm, omk), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.distance_DA)) return
def test_dr11lyax(): like = dr11lya_x() for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) cosmo = lcdm(Hth, omm, omk) print("H = %8.3f omm = %8.3f omk = %8.3f" %(Hth, omm, omk), end=' ') print("Hz = %8.3f"%cosmo.Hofz(2.36), end=' ') print("DA = %8.3f"%cosmo.distance_DA(2.36), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.Hofz, cosmo.distance_DA)) return
def test_dr11(): like = dr11('/home/ekli/myworks/cosmodata/BAO/bao_DR11quasars.txt') for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) cosmo = lcdm(Hth, omm, omk) print("H = %8.3f omm = %8.3f omk = %8.3f" %(Hth, omm, omk), end=' ') print("Hz = %8.3f"%cosmo.Hofz(2.36), end=' ') print("DA = %8.3f"%cosmo.distance_DA(2.36), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.Hofz, cosmo.distance_DA)) return
def test_mgs(): datfile = '/home/ekli/myworks/cosmodata/BAO/bao_MGS.txt' probfile = '/home/ekli/myworks/cosmodata/BAO/sdss_MGS_prob.txt' like = mgs(datfile, probfile) for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) cosmo = lcdm(Hth, omm, omk) print("H = %8.3f omm = %8.3f omk = %8.3f" %(Hth, omm, omk), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.distance_DV), end=' ') print("chisq = %12.4e"%like.loglikelihood_cal(cosmo.distance_DV)) return
def test_dr11lyaa(): like = dr11lya_a() for i in range(10): Hth = np.random.normal(70,3) omm = np.random.normal(0.3,0.1) omk = np.random.normal(0.0,0.1) rs = np.random.normal(148.8,4) cosmo = lcdm(Hth, omm, omk) print("H = %8.3f omm = %8.3f omk = %8.3f rs = %8.3f" %(Hth, omm, omk, rs), end=' ') print("Hz = %8.3f"%(3e5/cosmo.Hofz(2.36)/rs/8.708), end=' ') print("DA = %8.3f"%(cosmo.distance_DA(2.36)/rs/11.59), end=' ') print("chisq = %12.4e"%like.loglikelihood(cosmo.Hofz, cosmo.distance_DA, rs)) return