monofonic support for A_s or sigma8
This commit is contained in:
parent
8c92adcbcf
commit
c58ec1de1b
1 changed files with 8 additions and 3 deletions
|
@ -95,8 +95,6 @@ def get_config_from_dict(monofonic_dict):
|
||||||
"Omega_L": monofonic_dict["Omega_q"],
|
"Omega_L": monofonic_dict["Omega_q"],
|
||||||
"H0": monofonic_dict["h"]*100.,
|
"H0": monofonic_dict["h"]*100.,
|
||||||
"n_s": monofonic_dict["n_s"],
|
"n_s": monofonic_dict["n_s"],
|
||||||
"sigma_8": monofonic_dict["sigma8"],
|
|
||||||
"A_s": monofonic_dict["A_s"],
|
|
||||||
"Tcmb": monofonic_dict["Tcmb"],
|
"Tcmb": monofonic_dict["Tcmb"],
|
||||||
"k_p": monofonic_dict["k_p"],
|
"k_p": monofonic_dict["k_p"],
|
||||||
"N_ur": monofonic_dict["N_ur"],
|
"N_ur": monofonic_dict["N_ur"],
|
||||||
|
@ -112,6 +110,13 @@ def get_config_from_dict(monofonic_dict):
|
||||||
"ZeroRadiation": False
|
"ZeroRadiation": False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if "A_s" in monofonic_dict.keys() and monofonic_dict["A_s"] is not None:
|
||||||
|
config["cosmology"]["A_s"] = monofonic_dict["A_s"]
|
||||||
|
elif "sigma8" in monofonic_dict.keys() and monofonic_dict["sigma8"] is not None:
|
||||||
|
config["cosmology"]["sigma8"] = monofonic_dict["sigma8"]
|
||||||
|
else:
|
||||||
|
raise KeyError("Either A_s or sigma8 must be provided in the cosmology parameters.")
|
||||||
|
|
||||||
config["random"] = {
|
config["random"] = {
|
||||||
"generator": "NGENIC",
|
"generator": "NGENIC",
|
||||||
"seed": monofonic_dict["seed"]
|
"seed": monofonic_dict["seed"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue