else: print("Error, choose between CFHT and KiDs data") quit() mmin_st = 7.0 x = dataCFHT.thetas() # Data from CFHTLenS survey xip = dataCFHT.xip() xim = dataCFHT.xim() y = xip.copy() y = np.append(y, xim) # Considering the real covariance matrix and all kind of errors yerr = dataCFHT.cov_mat() yerrinv = np.linalg.inv(yerr) det = np.linalg.det(yerr) errp = dataCFHT.sigp() errm = dataCFHT.sigm() chain = np.load('mcmc/results/{1}/ihm={2}/mmin_chain{0}.npy'.format( *[icosmo, usedData, ihm])) otherchain = chain.reshape((nwalkers, steps, ndim)) # removing first steps samples = chain[:, firsts:, :].reshape((-1, ndim)) # plot model with results
# Importing Data from CFHT print("Loading data") # Length of CFHT thetas data N = 21 x = data.thetas() # Data from CFHTLenS survey xip = data.xip() xim = data.xim() y = xip.copy() y = np.append(y, xim) # Considering the real covariance matrix and all kind of errors yerr = data.cov_mat() yerrinv = np.linalg.inv(yerr) det = np.linalg.det(yerr) errp = data.sigp() errm = data.sigm() def lnlike(param, y, invcov, verbose=False): alpha = param[0] if not (0.5 <= alpha <= 1.5): return -np.inf model = correlation.xi_ampCFHT(alpha, icosmo, ihm, verbose=verbose) if model[0] == -np.pi: return -np.inf return -0.5 * np.matmul(np.transpose(y - model), np.matmul(invcov, (y - model)))
# Importing Data from CFHT print("Loading data") # Length of CFHT thetas data N = 21 x = dat.thetas() # Data from CFHTLenS survey xip = dat.xip() xim = dat.xim() y = xip.copy() y = np.append(y, xim) # Considering the real covariance matrix and all kind of errors yerr = dat.cov_mat() yerrinv = np.linalg.inv(yerr) det = np.linalg.det(yerr) errp = dat.sigp() errm = dat.sigm() def lnlike(param, y, invcov, verbose=False): alpha = param[0] if not (0.5 < alpha < 1.5): return -np.inf model = correlation.xi_ampCFHT(alpha, icosmo, ihm, verbose=verbose) if model[0] == -np.pi: return -np.inf return -0.5 * np.matmul(np.transpose(y - model), np.matmul(invcov, (y - model)))