diff --git a/CHANGELOG.md b/CHANGELOG.md index f6b5f73..7b81663 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,3 +32,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 1.1.4 : Coverage reports with Codecov 1.2.0 : Big update of configuration, specification yamls and nuisance parameter interface. No backwards compatibility of yamls! 1.2.1 : Updating configs of other surveys: SKAO, DESI, LSST to work in new config file structure +1.2.2 : Galaxy sample split for sources and lenses. Feedback prints more consistent. diff --git a/cosmicfishpie/LSSsurvey/photo_cov.py b/cosmicfishpie/LSSsurvey/photo_cov.py index 3a54843..11d2535 100644 --- a/cosmicfishpie/LSSsurvey/photo_cov.py +++ b/cosmicfishpie/LSSsurvey/photo_cov.py @@ -70,15 +70,24 @@ def __init__(self, cosmopars, photopars, IApars, biaspars, fiducial_Cls=None): self.allparsfid.update(self.photopars) self.fiducial_Cls = fiducial_Cls self.observables = [] + self.binrange = {} for key in cfg.obs: if key in ["GCph", "WL"]: self.observables.append(key) - self.binrange = cfg.specs["binrange"] + if key == "GCph": + self.binrange[key] = cfg.specs["binrange_GCph"] + elif key == "WL": + self.binrange[key] = cfg.specs["binrange_WL"] + + self.binrange_WL = cfg.specs["binrange_WL"] + self.binrange_GCph = cfg.specs["binrange_GCph"] self.feed_lvl = cfg.settings["feedback"] self.fsky_WL = cfg.specs.get("fsky_WL") self.fsky_GCph = cfg.specs.get("fsky_GCph") - self.ngalbin = np.array(cfg.specs["ngalbin"]) - self.numbins = len(cfg.specs["z_bins_ph"]) - 1 + self.ngalbin_WL = np.array(cfg.specs["ngalbin_WL"]) + self.ngalbin_GCph = np.array(cfg.specs["ngalbin_GCph"]) + self.numbins_WL = len(cfg.specs["z_bins_WL"]) - 1 + self.numbins_GCph = len(cfg.specs["z_bins_GCph"]) - 1 self.ellipt_error = cfg.specs["ellipt_error"] def getcls(self, allpars): @@ -134,16 +143,17 @@ def getclsnoise(self, cls): """ noisy_cls = copy.deepcopy(cls) - for ind in self.binrange: - for obs in self.observables: - if obs == "GCph": + for obs in self.observables: + if obs == "GCph": + for ind in self.binrange_GCph: noisy_cls[obs + " " + str(ind) + "x" + obs + " " + str(ind)] += ( - 1.0 / self.ngalbin[ind - 1] + 1.0 / self.ngalbin_GCph[ind - 1] ) - elif obs == "WL": + elif obs == "WL": + for ind in self.binrange_WL: noisy_cls[obs + " " + str(ind) + "x" + obs + " " + str(ind)] += ( self.ellipt_error**2.0 - ) / self.ngalbin[ind - 1] + ) / self.ngalbin_WL[ind - 1] return noisy_cls @@ -169,21 +179,26 @@ def get_covmat(self, noisy_cls): # Create indexes for data frame cols = [] for o in self.observables: - for ind in range(self.numbins): - cols.append(o + " " + str(ind + 1)) + if o == "WL": + for ind in range(self.numbins_WL): + cols.append(o + " " + str(ind + 1)) + elif o == "GCph": + for ind in range(self.numbins_GCph): + cols.append(o + " " + str(ind + 1)) for ind, ell in enumerate(noisy_cls["ells"]): covdf = pd.DataFrame(index=cols, columns=cols) covdf = covdf.fillna(0.0) - for obs1, obs2, bin1, bin2 in product( - self.observables, self.observables, self.binrange, self.binrange - ): - covdf.at[obs1 + " " + str(bin1), obs2 + " " + str(bin2)] = noisy_cls[ - obs1 + " " + str(bin1) + "x" + obs2 + " " + str(bin2) - ][ind] / np.sqrt( - np.sqrt(getattr(self, "fsky_" + obs1) * getattr(self, "fsky_" + obs1)) - ) + for obs1, obs2 in product(self.observables, self.observables): + for bin1, bin2 in product( + self.binrange[obs1], self.binrange[obs2] + ): # MMmod: BEWARE!!! THIS IS VERY UGLY! + covdf.at[obs1 + " " + str(bin1), obs2 + " " + str(bin2)] = noisy_cls[ + obs1 + " " + str(bin1) + "x" + obs2 + " " + str(bin2) + ][ind] / np.sqrt( + np.sqrt(getattr(self, "fsky_" + obs1) * getattr(self, "fsky_" + obs1)) + ) covvec.append(covdf) diff --git a/cosmicfishpie/LSSsurvey/photo_obs.py b/cosmicfishpie/LSSsurvey/photo_obs.py index 1b56268..1d1dc16 100644 --- a/cosmicfishpie/LSSsurvey/photo_obs.py +++ b/cosmicfishpie/LSSsurvey/photo_obs.py @@ -55,7 +55,7 @@ def memo_integral_efficiency(i, ngal_func, comoving_func, z, zint_mat, diffz): intg_mat = np.array( [ ( - ngal_func(zint_mat[zii], i) + ngal_func(zint_mat[zii], i, "WL") * (1 - comoving_func(zint_mat[zii, 0]) / comoving_func(zint_mat[zii])) ) for zii in range(len(zint_mat)) @@ -85,9 +85,8 @@ def faster_integral_efficiency(i, ngal_func, comoving_func, zarr): callable callable function that receives a numpy.ndarray of requested redshifts and returns the lensing efficiency for the i-th bin as a numpy.ndarray """ - wintgd = ngal_func(zarr, i)[:, None] * ( - 1.0 - comoving_func(zarr)[None, :] / comoving_func(zarr)[:, None] - ) + zprime = zarr[:, None] + wintgd = ngal_func(zprime, i, "WL") * (1.0 - comoving_func(zarr) / comoving_func(zprime)) witri = np.tril(wintgd) wint = integrate.trapezoid(witri, zarr, axis=0) intp = interp1d(zarr, wint, kind="cubic") @@ -176,9 +175,17 @@ def __init__( time_fin=tcosmo2, ) self.observables = [] + self.binrange = {} for key in cfg.obs: if key in ["GCph", "WL"]: self.observables.append(key) + if key == "GCph": + self.binrange[key] = cfg.specs["binrange_GCph"] + elif key == "WL": + self.binrange[key] = cfg.specs["binrange_WL"] + + self.binrange_WL = cfg.specs["binrange_WL"] + self.binrange_GCph = cfg.specs["binrange_GCph"] tnuis1 = time() self.biaspars = biaspars @@ -203,7 +210,7 @@ def __init__( tngal2 = time() upt.time_print( feedback_level=self.feed_lvl, - min_level=2, + min_level=3, text="---> Galaxy Photometric distributions obtained in ", instance=self, time_ini=tngal1, @@ -223,7 +230,7 @@ def __init__( raise ValueError("Observables not specified correctly") self.tracer = cfg.settings["GCph_Tracer"] - self.binrange = cfg.specs["binrange"] + # self.binrange = cfg.specs["binrange"] self.zsamp = int(round(200 * cfg.settings["accuracy"])) if cfg.settings["ell_sampling"] == "accuracy": self.ellsamp = int(round(100 * cfg.settings["accuracy"])) @@ -235,8 +242,9 @@ def __init__( self.ell = np.logspace( np.log10(cfg.specs["ellmin"]), np.log10(cfg.specs["ellmax"] + 10), num=self.ellsamp ) - self.z_min = cfg.specs["z_bins_ph"][0] - self.z_max = cfg.specs["z_bins_ph"][-1] + + self.z_min = np.min([cfg.specs["z_bins_GCph"][0], cfg.specs["z_bins_WL"][0]]) + self.z_max = np.max([cfg.specs["z_bins_GCph"][-1], cfg.specs["z_bins_WL"][-1]]) self.z = np.linspace(self.z_min, self.z_max, self.zsamp) self.dz = np.mean(np.diff(self.z)) @@ -444,7 +452,7 @@ def galaxy_kernel(self, z, i): # Wgc = self.window.norm_ngal_photoz(z,i) * np.array([self.nuisance.bias(self.biaspars, i)(z) * \ # Wgc = self.window.norm_ngal_photoz(z,i) * # np.array([self.biaspars['b{:d}'.format(i)] * \ - Wgc = self.window.norm_ngal_photoz(z, i) * self.cosmo.Hubble(z) + Wgc = self.window.norm_ngal_photoz(z, i, "GCph") * self.cosmo.Hubble(z) # Wgc = self.window.norm_ngal_photoz(z,i) * self.nuisance.bias(self.biaspars, i)(z) * \ # self.cosmo.Hubble(z) @@ -493,7 +501,7 @@ def lensing_kernel(self, z, i): ) # Adding Intrinsic alignment - WIA = self.window.norm_ngal_photoz(z, i) * np.array( + WIA = self.window.norm_ngal_photoz(z, i, "WL") * np.array( [self.IAvalue(zi) * self.cosmo.Hubble(zi) for zi in z] ) # Sakr Fix June 2023 @@ -546,7 +554,7 @@ def lensing_efficiency(self): list of callable functions that give the lensing efficiency for each bin """ teffstart = time() - efficiency = [self.integral_efficiency(i) for i in self.binrange] + efficiency = [self.integral_efficiency(i) for i in self.binrange_WL] efficiency.insert(0, None) teffend = time() upt.time_print( @@ -569,7 +577,7 @@ def compute_kernels(self): if "GCph" in self.observables: self.GC = [ interp1d(self.z, self.galaxy_kernel(self.z, ind), kind="cubic") - for ind in self.binrange + for ind in self.binrange_GCph ] self.GC.insert(0, None) if "WL" in self.observables: @@ -578,13 +586,13 @@ def compute_kernels(self): # self.WL = [interp1d(self.z,self.lensing_kernel(self.z,ind), kind='cubic') for ind in self.binrange] self.WL = [ interp1d(self.z, self.lensing_kernel(self.z, ind)[0], kind="cubic") - for ind in self.binrange + for ind in self.binrange_WL ] self.WL.insert(0, None) # Sakr Fix June 2023 self.WL_IA = [ interp1d(self.z, self.lensing_kernel(self.z, ind)[1], kind="cubic") - for ind in self.binrange + for ind in self.binrange_WL ] self.WL_IA.insert(0, None) return None @@ -655,19 +663,21 @@ def computecls(self): tcell = time() # PYTHONIZE THIS HORRIBLE THING - for obs1, obs2, bin1, bin2 in product( - self.observables, self.observables, self.binrange, self.binrange - ): - clinterp = self.clsintegral(obs1, obs2, bin1, bin2, hub) - - finalcls = np.zeros((len(full_ell))) - for ind, lval in enumerate(full_ell): - if (cfg.specs["lmin_" + obs1] <= lval <= cfg.specs["lmax_" + obs1]) and ( - cfg.specs["lmin_" + obs2] <= lval <= cfg.specs["lmax_" + obs2] - ): - finalcls[ind] = clinterp(lval) - - cls[obs1 + " " + str(bin1) + "x" + obs2 + " " + str(bin2)] = finalcls + # for obs1, obs2, bin1, bin2 in product( + # self.observables, self.observables, self.binrange[0], self.binrange[1] #MMmod: BEWARE! THIS IS UGLY! + # ): + for obs1, obs2 in product(self.observables, self.observables): + for bin1, bin2 in product(self.binrange[obs1], self.binrange[obs2]): + clinterp = self.clsintegral(obs1, obs2, bin1, bin2, hub) + + finalcls = np.zeros((len(full_ell))) + for ind, lval in enumerate(full_ell): + if (cfg.specs["lmin_" + obs1] <= lval <= cfg.specs["lmax_" + obs1]) and ( + cfg.specs["lmin_" + obs2] <= lval <= cfg.specs["lmax_" + obs2] + ): + finalcls[ind] = clinterp(lval) + + cls[obs1 + " " + str(bin1) + "x" + obs2 + " " + str(bin2)] = finalcls tbin = time() upt.time_print( @@ -723,10 +733,13 @@ def computecls_vectorized(self): # Pre-compute all clsintegrals clinterps = {} - for obs1, obs2, bin1, bin2 in product( - self.observables, self.observables, self.binrange, self.binrange - ): - clinterps[(obs1, obs2, bin1, bin2)] = self.clsintegral(obs1, obs2, bin1, bin2, hub) + for obs1, obs2 in product(self.observables, self.observables): + # Get the correct binrange for each observable + bins1 = self.binrange[obs1] + bins2 = self.binrange[obs2] + + for bin1, bin2 in product(bins1, bins2): + clinterps[(obs1, obs2, bin1, bin2)] = self.clsintegral(obs1, obs2, bin1, bin2, hub) # Vectorized computation of finalcls for (obs1, obs2, bin1, bin2), clinterp in clinterps.items(): diff --git a/cosmicfishpie/LSSsurvey/photo_window.py b/cosmicfishpie/LSSsurvey/photo_window.py index 1672f75..58691ed 100644 --- a/cosmicfishpie/LSSsurvey/photo_window.py +++ b/cosmicfishpie/LSSsurvey/photo_window.py @@ -44,15 +44,17 @@ def __init__(self, photopars): n_i_vec : callable callable function that receives the index of a redshift bin and a numpy.ndarray of redshifts and gives back the binned galaxy redshift distribution without photometric redshift errors """ - self.z_bins = cfg.specs["z_bins_ph"] - self.n_bins = len(self.z_bins) + self.z_bins_WL = cfg.specs["z_bins_WL"] + self.n_bins_WL = len(self.z_bins_WL) + self.z_bins_GCph = cfg.specs["z_bins_GCph"] + self.n_bins_GCph = len(self.z_bins_GCph) self.z0 = cfg.specs["z0"] self.z0_p = cfg.specs["z0_p"] self.ngamma = cfg.specs["ngamma"] self.photo = photopars - self.z_min = self.z_bins[0] - self.z_max = self.z_bins[-1] - self.normalization = self.norm() + self.z_min = np.min([cfg.specs["z_bins_GCph"][0], cfg.specs["z_bins_WL"][0]]) + self.z_max = np.max([cfg.specs["z_bins_GCph"][-1], cfg.specs["z_bins_WL"][-1]]) + self.normalization = {"GCph": self.norm("GCph"), "WL": self.norm("WL")} self.n_i_vec = np.vectorize(self.n_i) def dNdz(self, z): @@ -105,7 +107,7 @@ def n_i(self, z, i): dNdz_at_z[~mask] = 0.0 return dNdz_at_z - def ngal_photoz(self, z, i): + def ngal_photoz(self, z, i, obs): """Function to compute the binned galaxy redshift distribution convolved with photometric redshift errors n^{ph}_i(z) Parameters @@ -128,14 +130,19 @@ def ngal_photoz(self, z, i): p_{ph}(z_p|z) = \\frac{1-f_{out}}{\\sqrt{2\\pi}\\sigma_b(1+z)} \\exp\\left\\{-\\frac{1}{2}\\left[\\frac{z-c_bz_p-z_b}{\\sigma_b(1+z)}\\right]^2\\right\\} \\ + \\frac{f_{out}}{\\sqrt{2\\pi}\\sigma_0(1+z)} \\exp\\left\\{-\\frac{1}{2}\\left[\\frac{z-c_0z_p-z_0}{\\sigma_0(1+z)}\\right]^2\\right\\} """ - if i == 0 or i >= 11: - return None + if obs == "GCph": + z_bins = self.z_bins_GCph + elif obs == "WL": + z_bins = self.z_bins_WL + + # if i == 0 or i >= 11: + # return None term1 = ( self.photo["cb"] * self.photo["fout"] * erf( - (np.sqrt(1 / 2) * (z - self.photo["zo"] - self.photo["co"] * self.z_bins[i - 1])) + (np.sqrt(1 / 2) * (z - self.photo["zo"] - self.photo["co"] * z_bins[i - 1])) / (self.photo["sigma_o"] * (1 + z)) ) ) @@ -143,7 +150,7 @@ def ngal_photoz(self, z, i): -self.photo["cb"] * self.photo["fout"] * erf( - (np.sqrt(1 / 2) * (z - self.photo["zo"] - self.photo["co"] * self.z_bins[i])) + (np.sqrt(1 / 2) * (z - self.photo["zo"] - self.photo["co"] * z_bins[i])) / (self.photo["sigma_o"] * (1 + z)) ) ) @@ -151,7 +158,7 @@ def ngal_photoz(self, z, i): self.photo["co"] * (1 - self.photo["fout"]) * erf( - (np.sqrt(1 / 2) * (z - self.photo["zb"] - self.photo["cb"] * self.z_bins[i - 1])) + (np.sqrt(1 / 2) * (z - self.photo["zb"] - self.photo["cb"] * z_bins[i - 1])) / (self.photo["sigma_b"] * (1 + z)) ) ) @@ -159,7 +166,7 @@ def ngal_photoz(self, z, i): -self.photo["co"] * (1 - self.photo["fout"]) * erf( - (np.sqrt(1 / 2) * (z - self.photo["zb"] - self.photo["cb"] * self.z_bins[i])) + (np.sqrt(1 / 2) * (z - self.photo["zb"] - self.photo["cb"] * z_bins[i])) / (self.photo["sigma_b"] * (1 + z)) ) ) @@ -170,7 +177,7 @@ def ngal_photoz(self, z, i): / (2 * self.photo["co"] * self.photo["cb"]) ) - def norm(self): + def norm(self, obs): """n^{ph}_i(z) Parameters @@ -187,6 +194,11 @@ def norm(self): """ + if obs == "GCph": + z_bins = self.z_bins_GCph + elif obs == "WL": + z_bins = self.z_bins_WL + # norm = romberg(self.ngal_photoz, self.z_min, self.z_max, args=(i,)) # Using this as romberg was giving crazy normalizations for the first 2 # bins @@ -194,14 +206,14 @@ def norm(self): dz = self.z_max / 1000 norm = [ - trapezoid([self.ngal_photoz(z, i) for z in zint], dx=dz) - for i in range(1, len(self.z_bins)) + trapezoid([self.ngal_photoz(z, i, obs) for z in zint], dx=dz) + for i in range(1, len(z_bins)) ] norm.insert(0, None) return norm - def norm_ngal_photoz(self, z, i): + def norm_ngal_photoz(self, z, i, obs): """n^{ph}_i(z) Parameters @@ -223,4 +235,4 @@ def norm_ngal_photoz(self, z, i): # Using this as romberg was giving crazy normalizations for the first 2 # bins - return np.array([self.ngal_photoz(zi, i) for zi in z]) / self.normalization[i] + return np.array([self.ngal_photoz(zi, i, obs) for zi in z]) / self.normalization[obs][i] diff --git a/cosmicfishpie/configs/config.py b/cosmicfishpie/configs/config.py index 8bd8d51..fad8129 100644 --- a/cosmicfishpie/configs/config.py +++ b/cosmicfishpie/configs/config.py @@ -200,11 +200,6 @@ def init( """ global settings settings = options - if "camb_path" not in settings: - import camb - - cambpath = os.path.dirname(camb.__file__) - settings["camb_path"] = cambpath # Set defaults if not contained previously in options settings.setdefault( "specs_dir_default", @@ -273,11 +268,12 @@ def init( settings.setdefault("ShareDeltaNeff", False) settings.setdefault("kh_rescaling_bug", False) settings.setdefault("kh_rescaling_beforespecerr_bug", False) + feed_lvl = settings["feedback"] + global external global input_type if extfiles is not None and settings["code"] == "external": - print("Using input files for cosmology observables.") input_type = settings["code"] extfiles_default = { "file_names": { @@ -305,6 +301,12 @@ def init( if os.path.isdir(external["directory"]): ff = external["fiducial_folder"] + dii = external["directory"] + upt.time_print( + feedback_level=feed_lvl, + min_level=0, + text=f"-> Using input files for cosmology observables: {dii}", + ) fidudir = glob.glob(os.path.join(external["directory"], ff + "*")) lendir = len(fidudir) if lendir < 1: @@ -319,8 +321,13 @@ def init( ) ) else: - print("External directory: ", external["directory"]) - print("{:d} subfolders for parameter {:s}".format(lensub, dd)) + upt.time_print( + feedback_level=feed_lvl, + min_level=1, + text=f"-> {lensub} folders for parameter {dd}", + ) + # print("External directory: ", external["directory"]) + # print("{:d} subfolders for parameter {:s}".format(lensub, dd)) else: raise ValueError("External directory does not exist") @@ -332,6 +339,11 @@ def init( boltzmann_classpars = parsed_boltzmann external = None elif settings["code"] == "camb": + if "camb_path" not in settings: + import camb + + cambpath = os.path.dirname(camb.__file__) + settings["camb_path"] = cambpath input_type = settings["code"] global boltzmann_cambpars boltzmann_yaml_file = open(settings["camb_config_yaml"]) @@ -399,12 +411,28 @@ def create_ph_dict(foldername, filename): ph_yaml_fs.close() photo_dict = ph_yaml_content["specifications"] - z_bins_ph = photo_dict["z_bins_ph"] - photo_dict["z_bins_ph"] = np.array(z_bins_ph) - photo_dict["ngalbin"] = ngal_per_bin(photo_dict["ngal_sqarmin"], photo_dict["z_bins_ph"]) + # Load WL bins and num galaxies per bin make it backwards compatible + z_bins_WL = photo_dict.get("z_bins_WL", photo_dict.get("z_bins_ph")) + photo_dict["z_bins_WL"] = np.array(z_bins_WL) + photo_dict["ngal_sqarmin_WL"] = photo_dict.get( + "ngal_sqarmin_WL", photo_dict.get("ngal_sqarmin") + ) + photo_dict["ngalbin_WL"] = ngal_per_bin( + photo_dict["ngal_sqarmin_WL"], photo_dict["z_bins_WL"] + ) + photo_dict["binrange_WL"] = range(1, len(photo_dict["z_bins_WL"])) + # Load GCph bins and num galaxies per bin make it backwards compatible + photo_dict["z_bins_GCph"] = photo_dict.get("z_bins_GCph", photo_dict.get("z_bins_ph")) + photo_dict["ngal_sqarmin_GCph"] = photo_dict.get( + "ngal_sqarmin_GCph", photo_dict.get("ngal_sqarmin") + ) + photo_dict["ngalbin_GCph"] = ngal_per_bin( + photo_dict["ngal_sqarmin_GCph"], photo_dict["z_bins_GCph"] + ) + photo_dict["binrange_GCph"] = range(1, len(photo_dict["z_bins_GCph"])) + # Load theoretical n(z) parameters photo_dict["z0"] = photo_dict["zm"] / np.sqrt(2) photo_dict["z0_p"] = photo_dict["z0"] - photo_dict["binrange"] = range(1, len(photo_dict["z_bins_ph"])) return photo_dict @@ -634,7 +662,7 @@ def create_sp_dict(foldername, filename, type="spectro"): if biasmodel == "binned" or biasmodel == "binned_constant": generate_bias_keys = bias_prtz[biasmodel]["generate_bias_keys"] if generate_bias_keys: - zbins = specs["z_bins_ph"] + zbins = specs.get("z_bins_GCph", specs.get("z_bins_ph")) for ind in range(1, len(zbins)): keystr = bias_prtz[biasmodel]["keystr"] key = keystr + str(ind) @@ -742,7 +770,7 @@ def create_sp_dict(foldername, filename, type="spectro"): freeparams.setdefault(key, default_eps_gc_nuis) for key in Spectrononlinearparams: freeparams.setdefault(key, default_eps_gc_nonlin) - # Only add the free parameters that are not already in the dictionary + # Only add the free parameters that are not already in the dictionary upt.debug_print("Final dict of free parameters in config.py:") upt.debug_print(freeparams) diff --git a/cosmicfishpie/configs/default_boltzmann_yaml_files/camb/default_hmcode.yaml b/cosmicfishpie/configs/default_boltzmann_yaml_files/camb/default_hmcode.yaml new file mode 100644 index 0000000..495a767 --- /dev/null +++ b/cosmicfishpie/configs/default_boltzmann_yaml_files/camb/default_hmcode.yaml @@ -0,0 +1,37 @@ +ACCURACY: + 'k_per_logint' : 50 + 'AccuracyBoost' : 1 + 'lAccuracyBoost' : 1 + 'lSampleBoost' : 1 + 'accurate_massive_neutrino_transfers' : False + 'MassiveNuMethod' : 0 +NUMERICS: + 'zmax' : 5 + 'zsamples': 100 + 'extrap_kmax' : 100 +COSMO_SETTINGS: +# Massive neutrino baseline model + 'kmax' : 50 + 'share_delta_neff' : True + 'halofit_version' : 'mead2020' + 'dark_energy_model' : 'ppf' + 'num_nu_massive' : 1 + 'num_nu_massless' : 2.044 + 'TCMB': 2.7255 + 'WantTensors' : False + 'WantVectors' : False + 'Reion.Reionization' : False + 'WantCls' : False + 'Want_CMB' : False + 'Want_CMB_lensing': False + 'Want_cl_2D_array' : False + 'DoLateRadTruncation': True + 'DoLensing': False +LCDM: + 'Omegak' : 0. + 'mnu' : 0.06 + 'YHe': 0.2454006 +w0waCDM: + 'Omegak' : 0. + 'mnu' : 0.06 + 'YHe': 0.2454006 \ No newline at end of file diff --git a/cosmicfishpie/configs/default_survey_specifications/Euclid-Photometric-ISTF-Pessimistic.yaml b/cosmicfishpie/configs/default_survey_specifications/Euclid-Photometric-ISTF-Pessimistic.yaml index 0b4f6df..57176fc 100644 --- a/cosmicfishpie/configs/default_survey_specifications/Euclid-Photometric-ISTF-Pessimistic.yaml +++ b/cosmicfishpie/configs/default_survey_specifications/Euclid-Photometric-ISTF-Pessimistic.yaml @@ -1,8 +1,10 @@ specifications: - 'z_bins_ph': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] + 'z_bins_GCph': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] + 'z_bins_WL': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] 'zm': 0.9 'ngamma': 1.5 - 'ngal_sqarmin': 30 + 'ngal_sqarmin_GCph': 30 + 'ngal_sqarmin_WL': 30 photo_z_params: 'fout': 0.1 'co': 1 diff --git a/cosmicfishpie/cosmology/nuisance.py b/cosmicfishpie/cosmology/nuisance.py index 26ac9a5..eaefb2d 100644 --- a/cosmicfishpie/cosmology/nuisance.py +++ b/cosmicfishpie/cosmology/nuisance.py @@ -86,13 +86,14 @@ def __init__( self._vectorized_gcsp_rescale_sigmapv_at_z = np.vectorize( self.gcsp_rescale_sigmapv_at_z, excluded=["sigma_key"] ) + if "WL" in self.observables or "GCph" in self.observables: + self.z = np.linspace( + min(self.specs["z_bins_WL"][0], self.specs["z_bins_GCph"][0]), + max(self.specs["z_bins_WL"][-1], self.specs["z_bins_GCph"][-1]) + 1, + 50 * self.settings["accuracy"], + ) if "WL" in self.observables: self.lumratio = self.luminosity_ratio() - if "GCph" in self.observables or "WL" in self.observables: - self.z_bins_ph = self.specs["z_bins_ph"] - self.z_ph = np.linspace( - self.z_bins_ph[0], self.z_bins_ph[-1] + 1, 50 * self.settings["accuracy"] - ) def gcph_bias(self, biaspars, ibin=1): """Galaxy bias @@ -110,7 +111,7 @@ def gcph_bias(self, biaspars, ibin=1): """ self.biaspars = biaspars - z = self.z_ph + z = self.z # TBA: NEED TO INCLUDE CHECK OF THE BIASPARS PASSED @@ -119,9 +120,9 @@ def gcph_bias(self, biaspars, ibin=1): return interp1d(z, b, kind="linear") elif self.biaspars["bias_model"] == "binned": - zb = self.z_bins_ph + zb = self.specs["z_bins_GCph"] zba = np.array(zb) - brang = self.specs["binrange"] + brang = self.specs["binrange_GCph"] last_bin_num = brang[-1] def binbis(zz): @@ -175,7 +176,7 @@ def IA(self, IApars, cosmo): self.cosmo = cosmo self.Omegam = self.cosmo.Omegam_of_z(0.0) pivot_z_IA = self.settings["pivot_z_IA"] - z = self.z_ph + z = self.z if self.IApars["IA_model"] == "eNLA": CIA = 0.0134 * (1 + pivot_z_IA) fac = -self.IApars["AIA"] * CIA * self.Omegam @@ -194,25 +195,42 @@ def IA(self, IApars, cosmo): def luminosity_ratio(self): """Luminosity ratio function used for Intrinsic Alignment eNLA model. + + This function reads and interpolates the luminosity ratio /L*(z) from a file. + The ratio is used in the extended nonlinear alignment (eNLA) model for intrinsic alignments. + Parameters ---------- + None + Returns ------- - float - Value of the luminosity ratio + callable + An interpolation function that takes redshift z as input and returns the luminosity ratio. + If the luminosity ratio file cannot be loaded, returns a function that always returns 1.0. - Note + Notes ----- - Reads from file and interpolates the following quantity: - - .. math:: - \\frac{}{L_*(z)} + - Attempts to read the luminosity ratio from 'lumratio_file.dat' in the specs directory + - The file should contain two columns: redshift and luminosity ratio values + - The luminosity ratio represents /L*(z), where: + - is the mean luminosity at redshift z + - L*(z) is the characteristic luminosity at redshift z + - Uses linear interpolation between data points """ + try: + # Lumratio file for IA + lum = np.loadtxt(os.path.join(self.specsdir, "lumratio_file.dat")) + lumratio = interp1d(lum[:, 0], lum[:, 1], kind="linear") + logger.info("Successfully loaded luminosity ratio file") + except (FileNotFoundError, OSError) as e: + logger.warning(f"Could not load luminosity ratio file: {e}. Using default value of 1.0") + + def default_lumratio(z): + return np.ones_like(z) if hasattr(z, "__len__") else 1.0 + + lumratio = default_lumratio - # Lumratio file for IA - lum = np.loadtxt(os.path.join(self.specsdir, "lumratio_file.dat")) - # ,fill_value='extrapolate') - lumratio = interp1d(lum[:, 0], lum[:, 1], kind="linear") return lumratio def gcsp_zbins(self): diff --git a/cosmicfishpie/fishermatrix/cosmicfish.py b/cosmicfishpie/fishermatrix/cosmicfish.py index 2389f21..2a65330 100644 --- a/cosmicfishpie/fishermatrix/cosmicfish.py +++ b/cosmicfishpie/fishermatrix/cosmicfish.py @@ -189,6 +189,7 @@ def __init__( } self.parallel = parallel self.feed_lvl = self.settings["feedback"] + self.feed_lvl = cfg.settings["feedback"] allpars = {} allpars.update(self.fiducialcosmopars) allpars.update(self.photobiaspars) @@ -557,8 +558,13 @@ def photo_LSS_fishermatrix(self, noisy_cls=None, covmat=None, derivs=None, lss_o numpy.ndarray The full fisher matrix for the photometric probe """ - self.ph_z_bins = deepcopy(self.specs["z_bins_ph"]) - self.ph_num_z_bins = len(self.ph_z_bins) - 1 + # this numbers reduce to old z_bins_ph in config if specs not found + self.z_bins_WL = self.specs["z_bins_WL"] + self.num_z_bins_WL = len(self.specs["z_bins_WL"]) - 1 + self.binrange_WL = self.specs["binrange_WL"] + self.z_bins_GCph = self.specs["z_bins_GCph"] + self.num_z_bins_GCph = len(self.specs["z_bins_GCph"]) - 1 + self.binrange_GCph = self.specs["binrange_GCph"] if covmat is None and lss_obj is not None: noisy_cls, covmat = lss_obj.compute_covmat() if derivs is None and lss_obj is not None: @@ -575,8 +581,12 @@ def photo_LSS_fishermatrix(self, noisy_cls=None, covmat=None, derivs=None, lss_o cols = [] for o in self.observables: - for ind in range(self.ph_num_z_bins): - cols.append(o + " " + str(ind + 1)) + if o == "GCph": + for ind in range(self.num_z_bins_GCph): + cols.append(o + " " + str(ind + 1)) + elif o == "WL": + for ind in range(self.num_z_bins_WL): + cols.append(o + " " + str(ind + 1)) covarr = np.zeros(((len(lvec_ave)), len(cols), len(cols))) der1 = np.zeros((len(cols), len(cols))) @@ -647,8 +657,14 @@ def photo_LSS_fishermatrix_einsum(self, noisy_cls=None, covmat=None, derivs=None numpy.ndarray The full fisher matrix for the photometric probe """ - self.ph_z_bins = deepcopy(self.specs["z_bins_ph"]) - self.ph_num_z_bins = len(self.ph_z_bins) - 1 + # Get bin information for both WL and GCph + self.z_bins_WL = self.specs["z_bins_WL"] + self.num_z_bins_WL = len(self.specs["z_bins_WL"]) - 1 + self.binrange_WL = self.specs["binrange_WL"] + self.z_bins_GCph = self.specs["z_bins_GCph"] + self.num_z_bins_GCph = len(self.specs["z_bins_GCph"]) - 1 + self.binrange_GCph = self.specs["binrange_GCph"] + if covmat is None and lss_obj is not None: noisy_cls, covmat = lss_obj.compute_covmat() if derivs is None and lss_obj is not None: @@ -664,7 +680,13 @@ def photo_LSS_fishermatrix_einsum(self, noisy_cls=None, covmat=None, derivs=None lvec_ave = unu.moving_average(lvec, 2) # computing center of bins delta_ell = np.diff(lvec) # compute delta_ell between bin edges - cols = [f"{o} {ind+1}" for o in self.observables for ind in range(self.ph_num_z_bins)] + # Create columns list based on observables and their respective bin numbers + cols = [] + for o in self.observables: + if o == "GCph": + cols.extend([f"{o} {ind+1}" for ind in range(self.num_z_bins_GCph)]) + elif o == "WL": + cols.extend([f"{o} {ind+1}" for ind in range(self.num_z_bins_WL)]) # Precompute covariance matrices and their inverses covarr = np.array(covmat) @@ -706,6 +728,7 @@ def photo_LSS_fishermatrix_einsum(self, noisy_cls=None, covmat=None, derivs=None time_ini=tini, time_fin=time(), ) + # Sum up FisherV along the ell dimension FisherVV = np.sum(FisherV, axis=0) tfin = time() diff --git a/survey_specifications/DESI-Optimistic.yaml b/survey_specifications/DESI-Optimistic.yaml deleted file mode 100644 index aced1eb..0000000 --- a/survey_specifications/DESI-Optimistic.yaml +++ /dev/null @@ -1,20 +0,0 @@ -specifications: - 'z_bins': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] - 'zm': 0.9 - 'ngamma': 1.5 - 'ngal_sqarmin': 30 - 'ellipt_error': 0.3 - 'lmax_GCph': 1500 - 'lmin_GCph': 10 - 'fsky_GCph': 0.35 - 'lmax_WL': 5000 - 'lmin_WL': 10 - 'fsky_WL': 0.35 - 'kmax': 30. - 'bias_model': 'binned' - 'vary_ph_bias': 0.06 - 'vary_IA_pars': 0.06 - 'spec_sigma_dz': 0.001 - 'area_survey': 15000 - 'kmax_GCsp': 0.30 - 'kmin_GCsp': 0.001 diff --git a/survey_specifications/DESI_2bins_BGS_GCsp.dat b/survey_specifications/DESI_2bins_BGS_GCsp.dat deleted file mode 100644 index b92d660..0000000 --- a/survey_specifications/DESI_2bins_BGS_GCsp.dat +++ /dev/null @@ -1,4 +0,0 @@ -# area = 14000 deg^2 -# zmin zmean zmax dN/(dz dOmega) bias -0.000 0.100 0.200 2067.067 1.37604156 -0.200 0.350 0.500 955.289 1.43218750 diff --git a/survey_specifications/DESI_4bins_ELG_GCsp.dat b/survey_specifications/DESI_4bins_ELG_GCsp.dat deleted file mode 100644 index 4236cff..0000000 --- a/survey_specifications/DESI_4bins_ELG_GCsp.dat +++ /dev/null @@ -1,6 +0,0 @@ -# area = 14000 deg^2 -# zmin zmean zmax dN/(dz dOmega) bias -0.600 0.725 0.850 1109.096 1.04089527 -0.850 0.975 1.100 2069.961 1.11790038 -1.100 1.225 1.350 1242.607 1.20238256 -1.350 1.525 1.700 318.811 1.31223886 diff --git a/survey_specifications/DESI_BGS_GCsp.dat b/survey_specifications/DESI_BGS_GCsp.dat deleted file mode 100644 index be0040c..0000000 --- a/survey_specifications/DESI_BGS_GCsp.dat +++ /dev/null @@ -1,8 +0,0 @@ -# area = 14000 -# zmin zm zmax dn3 bias -0.00 0.05 0.10 1165 1.36436355 -0.10 0.15 0.20 3074 1.38771958 -0.20 0.25 0.30 1909 1.41026411 -0.30 0.35 0.40 732 1.4321875 -0.40 0.45 0.50 120 1.45366915 - diff --git a/survey_specifications/DESI_ELG_GCsp.dat b/survey_specifications/DESI_ELG_GCsp.dat deleted file mode 100644 index dfb3acd..0000000 --- a/survey_specifications/DESI_ELG_GCsp.dat +++ /dev/null @@ -1,13 +0,0 @@ -# area = 14000 -# zmin zm zmax dn3 bias -0.60 0.65 0.70 309 1.01916188 -0.70 0.75 0.80 2269 1.04813973 -0.80 0.85 0.90 1923 1.07832051 -0.90 0.95 1.00 2094 1.10973998 -1.00 1.05 1.10 1441 1.14238157 -1.10 1.15 1.20 1353 1.17619527 -1.20 1.25 1.30 1337 1.21111165 -1.30 1.35 1.40 523 1.24705172 -1.40 1.45 1.50 466 1.28393301 -1.50 1.55 1.60 329 1.32167414 -1.60 1.65 1.70 126 1.36019724 diff --git a/survey_specifications/Euclid-Photometric-ISTF-Pessimistic.yaml b/survey_specifications/Euclid-Photometric-ISTF-Pessimistic.yaml deleted file mode 100644 index 27f63f3..0000000 --- a/survey_specifications/Euclid-Photometric-ISTF-Pessimistic.yaml +++ /dev/null @@ -1,16 +0,0 @@ -specifications: - 'z_bins': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] - 'zm': 0.9 - 'ngamma': 1.5 - 'ngal_sqarmin': 30 - 'ellipt_error': 0.3 - 'lmax_GCph': 750 - 'lmin_GCph': 10 - 'fsky_GCph': 0.35 - 'lmax_WL': 1500 - 'lmin_WL': 10 - 'fsky_WL': 0.35 - 'kmax': 30. - 'bias_model': 'binned' - 'vary_ph_bias': 0.06 - 'vary_IA_pars': 0.035 \ No newline at end of file diff --git a/survey_specifications/Euclid-Spectroscopic-ISTF-Pessimistic.yaml b/survey_specifications/Euclid-Spectroscopic-ISTF-Pessimistic.yaml deleted file mode 100644 index b2352ab..0000000 --- a/survey_specifications/Euclid-Spectroscopic-ISTF-Pessimistic.yaml +++ /dev/null @@ -1,5 +0,0 @@ -specifications: - 'spec_sigma_dz': 0.001 - 'area_survey_spectro': 15000 - 'kmax_GCsp': 0.25 - 'kmin_GCsp': 0.001 diff --git a/survey_specifications/Euclid_GCsp_IST.dat b/survey_specifications/Euclid_GCsp_IST.dat deleted file mode 100644 index a9b4a13..0000000 --- a/survey_specifications/Euclid_GCsp_IST.dat +++ /dev/null @@ -1,7 +0,0 @@ -# area = 15000 -# zmin zm zmax dn3 bias -0.90 1.00 1.10 1815.0 1.4614804 -1.10 1.20 1.30 1701.5 1.6060949 -1.30 1.40 1.50 1410.0 1.7464790 -1.50 1.65 1.80 940.97 1.8988660 - diff --git a/survey_specifications/Planck.yaml b/survey_specifications/Planck.yaml deleted file mode 100644 index 8182c3b..0000000 --- a/survey_specifications/Planck.yaml +++ /dev/null @@ -1,9 +0,0 @@ -specifications: - 'lmin_CMB': 2 - 'lmax_CMB': 2500 - 'fsky_CMB_T': 0.85 - 'fsky_CMB_E': 0.85 - 'fsky_CMB_B': 0.85 - 'CMB_temp_sens': [4.7,2.5,2.2] - 'CMB_pol_sens': [6.6,3.5,3.1] - 'CMB_fwhm': [14.0,10.,7.1] diff --git a/survey_specifications/Rubin-Optimistic.yaml b/survey_specifications/Rubin-Optimistic.yaml deleted file mode 100644 index d617db8..0000000 --- a/survey_specifications/Rubin-Optimistic.yaml +++ /dev/null @@ -1,20 +0,0 @@ -specifications: - 'z_bins': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] - 'zm': 0.156 - 'ngamma': 0.68 - 'ngal_sqarmin': 27 - 'ellipt_error': 0.26 - 'lmax_GCph': 1500 - 'lmin_GCph': 10 - 'fsky_GCph': 0.33 - 'lmax_WL': 5000 - 'lmin_WL': 10 - 'fsky_WL': 0.35 - 'kmax': 30. - 'bias_model': 'binned' - 'vary_ph_bias': 0.06 - 'vary_IA_pars': 0.06 - 'spec_sigma_dz': 0.001 - 'area_survey': 14300 - 'kmax_GCsp': 0.30 - 'kmin_GCsp': 0.001 diff --git a/survey_specifications/Rubin-Pessimistic.yaml b/survey_specifications/Rubin-Pessimistic.yaml deleted file mode 100644 index 7e40594..0000000 --- a/survey_specifications/Rubin-Pessimistic.yaml +++ /dev/null @@ -1,20 +0,0 @@ -specifications: - 'z_bins': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] - 'zm': 0.156 - 'ngamma': 0.68 - 'ngal_sqarmin': 27 - 'ellipt_error': 0.26 - 'lmax_GCph': 750 - 'lmin_GCph': 10 - 'fsky_GCph': 0.33 - 'lmax_WL': 1500 - 'lmin_WL': 10 - 'fsky_WL': 0.35 - 'kmax': 30. - 'bias_model': 'binned' - 'vary_ph_bias': 0.06 - 'vary_IA_pars': 0.06 - 'spec_sigma_dz': 0.001 - 'area_survey': 14300 - 'kmax_GCsp': 0.30 - 'kmin_GCsp': 0.001 diff --git a/survey_specifications/SKA1-IM-z_Pnoise.txt b/survey_specifications/SKA1-IM-z_Pnoise.txt deleted file mode 100644 index 14910ca..0000000 --- a/survey_specifications/SKA1-IM-z_Pnoise.txt +++ /dev/null @@ -1,11 +0,0 @@ -5.000000000000000000e-01 5.200143308227902708e+02 -6.999999999999999556e-01 7.249834068686644741e+02 -9.000000000000000222e-01 9.292866759604880826e+02 -1.100000000000000089e+00 1.153835451138202643e+03 -1.299999999999999822e+00 1.414820744009373811e+03 -1.500000000000000000e+00 1.724827347732978978e+03 -1.700000000000000178e+00 2.093994240661818822e+03 -1.899999999999999911e+00 2.530685192355123490e+03 -2.100000000000000089e+00 3.041805899279226651e+03 -2.299999999999999822e+00 3.632931480134547655e+03 -2.500000000000000000e+00 4.308349353973489087e+03 diff --git a/survey_specifications/SKA1-Redbook-Optimistic.yaml b/survey_specifications/SKA1-Redbook-Optimistic.yaml deleted file mode 100644 index 9035c87..0000000 --- a/survey_specifications/SKA1-Redbook-Optimistic.yaml +++ /dev/null @@ -1,24 +0,0 @@ -specifications: - 'z_bins': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] - 'zm': 1.1 - 'ngamma': 1.25 - 'ngal_sqarmin': 2.7 - 'ellipt_error': 0.3 - 'lmax_GCph': 1500 - 'lmin_GCph': 10 - 'fsky_GCph': 0.1166 - 'lmax_WL': 5000 - 'lmin_WL': 10 - 'fsky_WL': 0.1166 - 'kmax': 30. - 'bias_model': 'binned' - 'vary_ph_bias': 0.06 - 'vary_IA_pars': 0.035 - 'spec_sigma_dz': 0.001 - 'area_survey': 5000 - 'kmax_GCsp': 0.30 - 'kmin_GCsp': 0.001 - 'D_dish': 15 - 'fsky_IM': 0.48 - 'time_tot': 10000 ## in hr - 'N_dish': 197 diff --git a/survey_specifications/SKA1-Redbook-Pessimistic.yaml b/survey_specifications/SKA1-Redbook-Pessimistic.yaml deleted file mode 100644 index 7da3024..0000000 --- a/survey_specifications/SKA1-Redbook-Pessimistic.yaml +++ /dev/null @@ -1,24 +0,0 @@ -specifications: - 'z_bins': [0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50] - 'zm': 1.1 - 'ngamma': 1.25 - 'ngal_sqarmin': 2.7 - 'ellipt_error': 0.3 - 'lmax_GCph': 750 - 'lmin_GCph': 10 - 'fsky_GCph': 0.1166 - 'lmax_WL': 3000 - 'lmin_WL': 10 - 'fsky_WL': 0.1166 - 'kmax': 30. - 'bias_model': 'binned' - 'vary_ph_bias': 0.06 - 'vary_IA_pars': 0.035 - 'spec_sigma_dz': 0.001 - 'area_survey': 5000 - 'kmax_GCsp': 0.25 - 'kmin_GCsp': 0.001 - 'D_dish': 15 - 'fsky_IM': 0.48 - 'time_tot': 10000 ## in hr - 'N_dish': 197 diff --git a/survey_specifications/SKA1_GCsp_MDB2_Redbook.dat b/survey_specifications/SKA1_GCsp_MDB2_Redbook.dat deleted file mode 100644 index eaaa05b..0000000 --- a/survey_specifications/SKA1_GCsp_MDB2_Redbook.dat +++ /dev/null @@ -1,8 +0,0 @@ -# area = 5000 -# zmin zm zmax dn3 bias -0.00 0.05 0.10 2714.82 0.64813367 -0.10 0.15 0.20 2722.37 0.71751723 -0.20 0.25 0.30 1264.00 0.79432839 -0.30 0.35 0.40 467.043 0.87936228 -0.40 0.45 0.50 154.353 0.97349916 - diff --git a/survey_specifications/SKA1_IM_MDB1_Redbook-44bins.dat b/survey_specifications/SKA1_IM_MDB1_Redbook-44bins.dat deleted file mode 100644 index a1d8009..0000000 --- a/survey_specifications/SKA1_IM_MDB1_Redbook-44bins.dat +++ /dev/null @@ -1,46 +0,0 @@ -# area = 5000 -# zmin zm zmax -0.40 0.43 0.45 -0.45 0.47 0.50 -0.50 0.53 0.55 -0.55 0.57 0.60 -0.60 0.62 0.65 -0.65 0.67 0.70 -0.70 0.72 0.75 -0.75 0.77 0.80 -0.80 0.82 0.85 -0.85 0.87 0.90 -0.90 0.92 0.95 -0.95 0.97 1.00 -1.00 1.02 1.05 -1.05 1.07 1.10 -1.10 1.12 1.15 -1.15 1.17 1.20 -1.20 1.22 1.25 -1.25 1.27 1.30 -1.30 1.32 1.35 -1.35 1.37 1.40 -1.40 1.42 1.45 -1.45 1.47 1.50 -1.50 1.52 1.55 -1.55 1.57 1.60 -1.60 1.62 1.65 -1.65 1.67 1.70 -1.70 1.72 1.75 -1.75 1.77 1.80 -1.80 1.82 1.85 -1.85 1.87 1.90 -1.90 1.92 1.95 -1.95 1.97 2.00 -2.00 2.02 2.05 -2.05 2.07 2.10 -2.10 2.12 2.15 -2.15 2.17 2.20 -2.20 2.22 2.25 -2.25 2.27 2.30 -2.30 2.32 2.35 -2.35 2.37 2.40 -2.40 2.42 2.45 -2.45 2.47 2.50 -2.50 2.52 2.55 -2.55 2.57 2.60 diff --git a/survey_specifications/SKA1_IM_MDB1_Redbook-5bins.dat b/survey_specifications/SKA1_IM_MDB1_Redbook-5bins.dat deleted file mode 100644 index 7d0dc45..0000000 --- a/survey_specifications/SKA1_IM_MDB1_Redbook-5bins.dat +++ /dev/null @@ -1,7 +0,0 @@ -# area = 5000 -# zmin zm zmax -0.40 0.60 0.80 -0.80 1.00 1.20 -1.20 1.40 1.60 -1.60 1.80 2.00 -2.00 2.30 2.60 diff --git a/survey_specifications/SKA1_IM_MDB1_Redbook-new.dat b/survey_specifications/SKA1_IM_MDB1_Redbook-new.dat deleted file mode 100644 index 1790da8..0000000 --- a/survey_specifications/SKA1_IM_MDB1_Redbook-new.dat +++ /dev/null @@ -1,12 +0,0 @@ -# area = 5000 -# zmin zm zmax -0.50 0.60 0.70 -0.70 0.80 0.90 -0.90 1.00 1.10 -1.10 1.20 1.30 -1.30 1.40 1.50 -1.50 1.65 1.80 -1.80 1.90 2.00 -2.00 2.10 2.20 -2.20 2.30 2.40 -2.40 2.40 2.60 diff --git a/survey_specifications/SKA1_IM_MDB1_Redbook.dat b/survey_specifications/SKA1_IM_MDB1_Redbook.dat deleted file mode 100644 index c6f039a..0000000 --- a/survey_specifications/SKA1_IM_MDB1_Redbook.dat +++ /dev/null @@ -1,13 +0,0 @@ -# area = 5000 -# zmin zm zmax -0.40 0.50 0.60 -0.60 0.70 0.80 -0.80 0.90 1.00 -1.00 1.10 1.20 -1.20 1.30 1.40 -1.40 1.50 1.60 -1.60 1.70 1.80 -1.80 1.90 2.00 -2.00 2.10 2.20 -2.20 2.30 2.40 -2.40 2.40 2.60 diff --git a/survey_specifications/SKA1_THI_sys_noise.txt b/survey_specifications/SKA1_THI_sys_noise.txt deleted file mode 100644 index f46a1da..0000000 --- a/survey_specifications/SKA1_THI_sys_noise.txt +++ /dev/null @@ -1,45 +0,0 @@ -0.403 27.2 - -0.470 26.9 - -0.539 26.8 - -0.612 26.9 - -0.767 27.5 - -0.850 28.1 - -0.938 28.8 - -1.03 29.8 - -1.12 30.8 - -1.22 32.1 - -1.33 33.5 - -1.44 35.2 - -1.55 37.1 - -1.67 39.2 - -1.80 41.6 - -1.93 44.2 - -2.07 47.2 - -2.22 50.6 - -2.37 54.4 - -2.54 58.6 - -2.69 63.4 - -2.87 68.8 - -3.05 74.8 diff --git a/survey_specifications/lumratio_file.dat b/survey_specifications/lumratio_file.dat deleted file mode 100644 index c4fc11a..0000000 --- a/survey_specifications/lumratio_file.dat +++ /dev/null @@ -1,223 +0,0 @@ -0.001 0.0422624840481661 -0.01 0.0422624840481661 -0.02 0.05897070355186251 -0.03 0.07255577739983624 -0.04 0.08467091946888433 -0.05 0.09593189812230896 -0.060000000000000005 0.10664712177770144 -0.06999999999999999 0.11699521627347793 -0.08 0.1270992083277226 -0.09 0.13705390990899569 -0.09999999999999999 0.14690642344508484 -0.11 0.1566888676060969 -0.12 0.16643375391606047 -0.13 0.1724344869254337 -0.14 0.17433109194333457 -0.15000000000000002 0.1757473541945655 -0.16 0.17672440753252677 -0.17 0.17732443933359154 -0.18000000000000002 0.17755095992312336 -0.19 0.1774276546632702 -0.2 0.17697607537146498 -0.21000000000000002 0.17618116399835188 -0.22 0.17510010444807342 -0.23 0.17375659038677757 -0.24000000000000002 0.17217320673196346 -0.25 0.17037819143823982 -0.26 0.16838260293214272 -0.27 0.1662032558802489 -0.28 0.16385607109506392 -0.29000000000000004 0.16135993200888227 -0.3 0.1268395609585578 -0.31 0.12907985938692612 -0.32 0.1313227497577787 -0.33 0.16665609703505335 -0.34 0.16929584470712533 -0.35000000000000003 0.1719423915586864 -0.36000000000000004 0.17459946931642292 -0.37 0.17727797307571466 -0.38 0.17997288336398 -0.39 0.18268574301584492 -0.4 0.18541814245604074 -0.41000000000000003 0.18818176471197284 -0.42000000000000004 0.190964732695651 -0.43 0.19376426348974152 -0.44 0.19657718620587164 -0.45 0.19937968574624748 -0.46 0.20219534900647373 -0.47000000000000003 0.20502891585161717 -0.48000000000000004 0.20788554744423796 -0.49 0.21080261127285052 -0.5 0.21374283204553862 -0.51 0.22350952406511845 -0.52 0.2336035324541177 -0.53 0.2439433943684961 -0.54 0.2545993321891511 -0.55 0.26558444157656447 -0.56 0.2769130418135315 -0.5700000000000001 0.28860077466932055 -0.5800000000000001 0.30066471185279176 -0.59 0.3131234720767489 -0.6 0.3259973488810591 -0.61 0.33936970696490565 -0.62 0.35320269038374674 -0.63 0.3675156939533921 -0.64 0.3820640469548151 -0.65 0.3971047212579667 -0.66 0.41265847319232857 -0.67 0.4287472836218983 -0.68 0.4453944366382141 -0.6900000000000001 0.4626721820724299 -0.7000000000000001 0.48055840217251805 -0.7100000000000001 0.4813775205236058 -0.72 0.4820990176914395 -0.73 0.4827218884910109 -0.74 0.4832451175572389 -0.75 0.48366768480479383 -0.76 0.4839885708985562 -0.77 0.4841368641336053 -0.78 0.4841878684606975 -0.79 0.48414736914298007 -0.8 0.48402119744976757 -0.81 0.4838152191357108 -0.8200000000000001 0.4835353237347566 -0.8300000000000001 0.4831874146768369 -0.8400000000000001 0.4827774002305864 -0.85 0.4823350742681689 -0.86 0.48183983064015856 -0.87 0.4812953425368187 -0.88 0.48070533434551505 -0.89 0.48007358032718883 -0.9 0.47940390358588325 -0.91 0.4847907664243074 -0.92 0.49020822444684875 -0.93 0.49598618363962366 -0.9400000000000001 0.5018098125480869 -0.9500000000000001 0.5076776814645202 -0.9600000000000001 0.5135882040113844 -0.97 0.5195396322991797 -0.98 0.5255300520416227 -0.99 0.5315573776464875 -1. 0.537619347301646 -1.01 0.5436823166591477 -1.02 0.5497745609123192 -1.03 0.5558956713828336 -1.04 0.5620452094653283 -1.05 0.5682227073154881 -1.06 0.5744276686130143 -1.07 0.580659569403094 -1.08 0.5869178590201877 -1.09 0.5932019610980112 -1.1 0.5995112746688078 -1.11 0.605891692836351 -1.12 0.6127211449556171 -1.1300000000000001 0.6195815964160508 -1.1400000000000001 0.6264690132765793 -1.1500000000000001 0.6333791356086362 -1.1600000000000001 0.644813608686229 -1.17 0.6564103462269469 -1.18 0.6681668054966379 -1.19 0.6800800703828802 -1.2 0.6921468339496962 -1.21 0.7043546542935721 -1.22 0.7167082491038208 -1.23 0.7292036132655302 -1.24 0.7418363336503534 -1.25 0.7546015742255656 -1.26 0.7674940613716712 -1.27 0.7805080694832518 -1.28 0.7936374069306319 -1.29 0.8068754024659347 -1.3 0.8202148921613625 -1.31 0.8337637971242551 -1.32 0.847394650378998 -1.33 0.8610911971470123 -1.34 0.8748362234293243 -1.35 0.8886115570378099 -1.36 0.9023980749858372 -1.37 0.9161757177724361 -1.3800000000000001 0.9299235110792485 -1.3900000000000001 0.9436195953733806 -1.4000000000000001 0.9572412638757712 -1.4100000000000001 0.9698852603074248 -1.42 0.9824404018717212 -1.43 0.9949389839085061 -1.44 1.0074149202606668 -1.45 1.019903669573896 -1.46 1.0324421889327275 -1.47 1.045068917613638 -1.48 1.0578237936784805 -1.49 1.0707483061522391 -1.5 1.0838855856394694 -1.51 1.0986678244882293 -1.52 1.1137037049200518 -1.53 1.1289549385532192 -1.54 1.1443810380961028 -1.55 1.1599391827034355 -1.56 1.176494387537008 -1.57 1.1931280204897803 -1.58 1.209790321333468 -1.59 1.226427998092991 -1.6 1.2429841895869798 -1.61 1.2581986866237946 -1.62 1.2732430767753842 -1.6300000000000001 1.2881294450409944 -1.6400000000000001 1.3028712522663541 -1.6500000000000001 1.3174833143954974 -1.6600000000000001 1.3276787813562607 -1.6700000000000002 1.3376872391682864 -1.68 1.3475286979667724 -1.69 1.3572241570940484 -1.7 1.3667955737010224 -1.71 1.3767642588366098 -1.72 1.3866336031210778 -1.73 1.3963967417141472 -1.74 1.4060467090179107 -1.75 1.4155764438525145 -1.76 1.424978794984031 -1.77 1.4342465270084865 -1.78 1.443372326594829 -1.79 1.45234880908668 -1.8 1.4611685254655216 -1.81 1.4695713514818438 -1.82 1.477814548391021 -1.83 1.4859064046013324 -1.84 1.4938555371769204 -1.85 1.5016708809854848 -1.86 1.5093616783194161 -1.87 1.516937469049639 -1.8800000000000001 1.5244080813671905 -1.8900000000000001 1.5317836231678212 -1.9000000000000001 1.5390744741300817 -1.9100000000000001 1.546612225274048 -1.9200000000000002 1.5540708365244194 -1.93 1.5614414292077905 -1.94 1.568714954415731 -1.95 1.5758821983567408 -1.96 1.5829337884348316 -1.97 1.589860200075993 -1.98 1.5966517643186025 -1.99 1.6032986761878085 -2. 1.6097910038667198 -2.01 1.6154226950405541 -2.02 1.6208957389150478 -2.03 1.6262205109290262 -2.04 1.6314076067227155 -2.05 1.6364678303116396 -2.0599999999999996 1.641412183049919 -2.07 1.6462518534222426 -2.0799999999999996 1.6509982077032226 -2.09 1.6556627815164082 -2.0999999999999996 1.6602572723268954 -2.11 1.6650448308014139 -2.1199999999999997 1.6697724515473982 -2.13 1.6744367914067166 -2.1399999999999997 1.6790344687262646 -2.15 1.6835620646116296 -2.1599999999999997 1.6880161242737217 -2.17 1.6923931584658716 -2.1799999999999997 1.6966896450160363 -2.19 1.7009020304535918 -2.1999999999999997 1.705026731733588 -2.21 1.7090759252716083 -4.1 2.4743735039574171 diff --git a/survey_specifications/nofz_ska1_5000.dat b/survey_specifications/nofz_ska1_5000.dat deleted file mode 100644 index 7c9a54d..0000000 --- a/survey_specifications/nofz_ska1_5000.dat +++ /dev/null @@ -1,50 +0,0 @@ - 0.10000000 171.00000 - 0.30000001 280.00000 - 0.50000000 219.00000 - 0.69999999 261.00000 - 0.90000004 218.00000 - 1.1000000 277.00000 - 1.3000001 222.00000 - 1.5000000 220.00000 - 1.7000000 158.00000 - 1.9000000 111.00000 - 2.1000001 108.00000 - 2.3000000 80.000000 - 2.5000000 64.000000 - 2.7000000 40.000000 - 2.9000001 26.000000 - 3.1000001 26.000000 - 3.3000000 13.000000 - 3.5000000 16.000000 - 3.7000000 7.0000000 - 3.9000001 5.0000000 - 4.0999999 7.0000000 - 4.3000002 5.0000000 - 4.5000000 0.0000000 - 4.7000003 0.0000000 - 4.9000001 2.0000000 - 5.0999999 1.0000000 - 5.3000002 0.0000000 - 5.5000000 0.0000000 - 5.7000003 0.0000000 - 5.9000001 0.0000000 - 6.0999999 0.0000000 - 6.3000002 0.0000000 - 6.5000000 0.0000000 - 6.7000003 0.0000000 - 6.9000001 0.0000000 - 7.0999999 0.0000000 - 7.3000002 0.0000000 - 7.5000000 0.0000000 - 7.7000003 0.0000000 - 7.9000001 0.0000000 - 8.1000004 0.0000000 - 8.3000002 0.0000000 - 8.5000000 0.0000000 - 8.6999998 0.0000000 - 8.9000006 0.0000000 - 9.1000004 0.0000000 - 9.3000002 0.0000000 - 9.5000000 0.0000000 - 9.6999998 0.0000000 - 9.9000006 0.0000000 diff --git a/tests/conftest.py b/tests/conftest.py index dc8eebf..ab1bf85 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,6 +5,7 @@ upt.debug = True code_to_use = "symbolic" +upt.debug = True @pytest.fixture(scope="module")