diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..21206ea --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1,7 @@ +# Contributors (Alphabetical Order) + +- Pierre Burger +- Ian Harrison [ORCID: 0000-0002-4437-0770](https://orcid.org/0000-0002-4437-0770) +- Hidde T Jense [0000-0002-9429-0015](https://orcid.org/0000-0002-9429-0015) +- Alessio Spurio Mancini [0000-0001-5698-0990](https://orcid.org/0000-0001-5698-0990) +- Davide Piras [ORCID: 0000-0002-9836-2661](https://orcid.org/0000-0002-9836-2661) diff --git a/cosmopower/__init__.py b/cosmopower/__init__.py index 261bd56..b63d0a6 100644 --- a/cosmopower/__init__.py +++ b/cosmopower/__init__.py @@ -8,7 +8,7 @@ __version__ = "0.2.0" -__author__ = "Alessio Spurio Mancini, Hidde Jense, and Ian Harrison" +__author__ = "Alessio Spurio Mancini" def get_cobaya_class(): diff --git a/cosmopower/examples/4_cobaya.py b/cosmopower/examples/4_cobaya.py index 8361909..7d1d134 100644 --- a/cosmopower/examples/4_cobaya.py +++ b/cosmopower/examples/4_cobaya.py @@ -74,10 +74,12 @@ min: 0.01 max: 0.12 ref: 0.05 - H0: - derived: true - sigma8: - derived: true + h: + prior: + min: 0.6 + max: 0.8 + ref: 0.67 + """ yaml = yaml_load(model) @@ -85,13 +87,14 @@ install(yaml) # Create the cobaya model. -model = get_model(model) +model = get_model(yaml) # The best-fit values from the Planck paper. plik_best_fit = { "ombh2": 22.383e-3, "omch2": 12.011e-2, "cosmomc_theta": 104.0909e-4, + "h": 0.67, "logA": 3.0448, "ns": 0.96605, "tau": 0.0543, diff --git a/cosmopower/util.py b/cosmopower/util.py index efc3f36..13d9300 100644 --- a/cosmopower/util.py +++ b/cosmopower/util.py @@ -73,7 +73,7 @@ def ell_factor(ls: np.ndarray, spectra: str) -> np.ndarray: elif spectra in ["pt", "pe", "pb", "tp", "ep", "bp"]: ellfac = ls * (ls + 1.0) / (2.0 * np.pi) elif spectra in ["pp"]: - ellfac = ls * (ls + 1.0) / (2.0 * np.pi) + ellfac = (ls * (ls + 1.0))**2. / (2.0 * np.pi) return ellfac diff --git a/cosmopower/wrappers/cosmosis/cosmopower_interface.py b/cosmopower/wrappers/cosmosis/cosmopower_interface.py index 62e2dec..6fe8e70 100644 --- a/cosmopower/wrappers/cosmosis/cosmopower_interface.py +++ b/cosmopower/wrappers/cosmosis/cosmopower_interface.py @@ -74,8 +74,12 @@ def get_cosmopower_outputs(block, netname, data, config): if config['ell_factor']: prefac *= cp.util.ell_factor(block[cmb_cl, 'ell'], cl_type) - #ToDo: ambiguity of 'Cl' vs 'cmb_cl' here - block[cmb_cl, cl_type] = data * prefac * cp.util.cmb_unit_factor(cl_type, config['units'], 2.7255) + if cl_type == 'pp': + ell = block[cmb_cl, 'ell'] + block[cmb_cl, cl_type] = 2.* np.pi * data * cp.util.cmb_unit_factor(cl_type, config['units'], 2.7255) / (ell*(ell + 1)) + else: + #ToDo: ambiguity of 'Cl' vs 'cmb_cl' here + block[cmb_cl, cl_type] = data * prefac * cp.util.cmb_unit_factor(cl_type, config['units'], 2.7255) if config['lmax'] > 0: ell_select = block[cmb_cl, 'ell'] <= config['lmax'] diff --git a/setup.py b/setup.py index 4a88abc..6f79b99 100644 --- a/setup.py +++ b/setup.py @@ -19,10 +19,12 @@ def read_file(file): long_description = read_file("README.md") # Determine whether the system is M1/M2 Mac -if 'arm' in os.uname().machine: - tensorflow = 'tensorflow-metal' -else: - tensorflow = 'tensorflow<2.14' +# if 'arm' in os.uname().machine: +# tensorflow = 'tensorflow-metal' +# else: +# tensorflow = 'tensorflow<2.14' + +tensorflow = 'tensorflow' setup(classifiers=['Operating System :: OS Independent', 'Intended Audience :: Developers',