np.save(sfisher.fid_file(bigDataDir, saveId), fish_fac_err) dUps = {} dDns = {} print("Waiting for ups and downs...") for i in range(1, numcores): data = np.empty(pbar.shape, dtype=np.float64) comm.Recv(data, source=i, tag=77) myParamIndex = old_div((i + 1), 2) - 1 if i % 2 == 1: dUps[inParamList[myParamIndex]] = data.copy() elif i % 2 == 0: dDns[inParamList[myParamIndex]] = data.copy() for param in inParamList: # dN = (dUps[param]-dDns[param])/stepSizes[param] # np.save(bigDataDir+"dNup_dzmq_"+saveId+"_"+param,dUps[param]) # np.save(bigDataDir+"dNdn_dzmq_"+saveId+"_"+param,dDns[param]) # np.save(bigDataDir+"dN_dzmq_"+saveId+"_"+param,dN) psbarup = dUps[param] psbardn = dDns[param] dpsbardp = (psbarup - psbardn) / stepSizes[param] np.save(bigDataDir + "psbarup_mukz_" + saveId + "_" + param, psbarup) np.save(bigDataDir + "psbardn_mukz_" + saveId + "_" + param, psbardn) np.save(sfisher.deriv_root(bigDataDir, saveId) + param, dpsbardp) else: data = psbar.astype(np.float64) comm.Send(data, dest=0, tag=77)
bigDataDir = Config.get('general', 'bigDataDirectory') fishSection = 'fisher-' + fishName paramList = Config.get(fishSection, 'paramList').split(',') paramLatexList = Config.get(fishSection, 'paramLatexList').split(',') saveName = Config.get(fishSection, 'saveSuffix') version = Config.get('general', 'version') pzcutoff = Config.getfloat('general', 'photoZCutOff') fsky = Config.getfloat(expName, 'fsky') zs = listFromConfig(Config, gridName, 'zrange') z_edges = np.arange(zs[0], zs[1] + zs[2], zs[2]) saveId = sfisher.save_id(expName, gridName, calName, version) derivRoot = sfisher.deriv_root(bigDataDir, saveId) # Fiducial number counts new_z_edges, N_fid = sfisher.rebinN( np.load(sfisher.fid_file(bigDataDir, saveId)), pzcutoff, z_edges) N_fid = N_fid * fsky print(("Effective number of clusters: ", N_fid.sum())) from collections import OrderedDict priorList = OrderedDict() priorList['tau'] = 0.01 priorList['H0'] = 10.0 priorList['omch2'] = 0.002 priorList['ombh2'] = 0.00023 priorList['ns'] = 0.006 priorList['As'] = 5.e-12 priorList['alpha_ym'] = 0.179