Skip to content

Commit

Permalink
Cmb parametrization (#148)
Browse files Browse the repository at this point in the history
* Change the default parametrization for CMB experiments.

* Removing w from parameters to set.
  • Loading branch information
vitenti committed Mar 7, 2024
1 parent ad018ef commit 6cc7788
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions numcosmo_py/app/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def create_cosmo_for_cmb(massive_nu: bool = False) -> Nc.HICosmo:
cosmo = Nc.HICosmoDEXcdm()

cosmo.params_set_default_ftype()
cosmo.omega_x2omega_k()
cosmo.cmb_params()
cosmo.param_set_by_name("H0", 70.0)
cosmo.param_set_by_name("Omegab", 0.05)
cosmo.param_set_by_name("Omegac", 0.25)
cosmo.param_set_by_name("omegab", 0.022)
cosmo.param_set_by_name("omegac", 0.12)

if massive_nu:
cosmo.orig_param_set(Nc.HICosmoDESParams.ENNU, 2.0328)
Expand All @@ -60,7 +60,7 @@ def create_cosmo_for_cmb(massive_nu: bool = False) -> Nc.HICosmo:
cosmo.set_property("H0_fit", True)
cosmo.set_property("Omegac_fit", True)
cosmo.set_property("Omegab_fit", True)
cosmo.set_property("w_fit", True)
cosmo.set_property("w_fit", False)
cosmo.param_set_by_name("Omegak", 0.00)
cosmo.set_property("Omegax_fit", False)

Expand Down Expand Up @@ -202,9 +202,8 @@ def generate_planck18_ttteee() -> tuple[Ncm.ObjDictStr, Ncm.ObjArray]:
EXP_PARAMETERS: dict[str, dict[str, float]] = {
Planck18Types.TT: {
"NcHICosmo:H0": 66.86,
"NcHICosmo:Omegac": 0.12068 / 0.6686**2,
"NcHICosmo:Omegab": 0.022126 / 0.6686**2,
"NcHICosmo:w": -1.0,
"NcHICosmo:omegac": 0.12068,
"NcHICosmo:omegab": 0.022126,
"NcHIPrim:ln10e10ASA": 3.0413,
"NcHIPrim:n_SA": 0.9635,
"NcHIReion:z_re": 7.54,
Expand All @@ -226,9 +225,8 @@ def generate_planck18_ttteee() -> tuple[Ncm.ObjDictStr, Ncm.ObjArray]:
},
Planck18Types.TTTEEE: {
"NcHICosmo:H0": 67.32,
"NcHICosmo:Omegac": 0.12010 / 0.6732**2,
"NcHICosmo:Omegab": 0.022377 / 0.6732**2,
"NcHICosmo:w": -1.0,
"NcHICosmo:omegac": 0.12010,
"NcHICosmo:omegab": 0.022377,
"NcHIPrim:ln10e10ASA": 3.0447,
"NcHIPrim:n_SA": 0.96589,
"NcHIReion:z_re": 7.68,
Expand Down

0 comments on commit 6cc7788

Please sign in to comment.