mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2025-01-31 04:01:36 +00:00
Fix no Vext option
This commit is contained in:
parent
3b4c32786c
commit
5e336b462b
3 changed files with 10 additions and 10 deletions
|
@ -599,7 +599,7 @@ def sample_simple(e_mu_min, e_mu_max, dmu_min, dmu_max, alpha_min, alpha_max,
|
||||||
|
|
||||||
def sample_calibration(Vext_min, Vext_max, Vmono_min, Vmono_max, beta_min,
|
def sample_calibration(Vext_min, Vext_max, Vmono_min, Vmono_max, beta_min,
|
||||||
beta_max, sigma_v_min, sigma_v_max, h_min, h_max,
|
beta_max, sigma_v_min, sigma_v_max, h_min, h_max,
|
||||||
sample_Vext, sample_Vmono, sample_beta, sample_h):
|
no_Vext, sample_Vmono, sample_beta, sample_h):
|
||||||
"""Sample the flow calibration."""
|
"""Sample the flow calibration."""
|
||||||
sigma_v = sample("sigma_v", Uniform(sigma_v_min, sigma_v_max))
|
sigma_v = sample("sigma_v", Uniform(sigma_v_min, sigma_v_max))
|
||||||
|
|
||||||
|
@ -608,10 +608,10 @@ def sample_calibration(Vext_min, Vext_max, Vmono_min, Vmono_max, beta_min,
|
||||||
else:
|
else:
|
||||||
beta = 1.0
|
beta = 1.0
|
||||||
|
|
||||||
if sample_Vext:
|
if no_Vext:
|
||||||
Vext = sample("Vext", Uniform(Vext_min, Vext_max).expand([3]))
|
|
||||||
else:
|
|
||||||
Vext = jnp.zeros(3)
|
Vext = jnp.zeros(3)
|
||||||
|
else:
|
||||||
|
Vext = sample("Vext", Uniform(Vext_min, Vext_max).expand([3]))
|
||||||
|
|
||||||
if sample_Vmono:
|
if sample_Vmono:
|
||||||
Vmono = sample("Vmono", Uniform(Vmono_min, Vmono_max))
|
Vmono = sample("Vmono", Uniform(Vmono_min, Vmono_max))
|
||||||
|
|
|
@ -671,7 +671,7 @@ class Paths:
|
||||||
def flow_validation(self, fdir, simname, catalogue, inference_method,
|
def flow_validation(self, fdir, simname, catalogue, inference_method,
|
||||||
smooth=None, nsim=None, zcmb_min=None, zcmb_max=None,
|
smooth=None, nsim=None, zcmb_min=None, zcmb_max=None,
|
||||||
mag_selection=None, sample_alpha=False,
|
mag_selection=None, sample_alpha=False,
|
||||||
sample_beta=False, sample_Vext=None,
|
sample_beta=False, no_Vext=None,
|
||||||
sample_Vmono=False, sample_mag_dipole=False,
|
sample_Vmono=False, sample_mag_dipole=False,
|
||||||
sample_curvature=False, absolute_calibration=None):
|
sample_curvature=False, absolute_calibration=None):
|
||||||
"""Flow validation file path."""
|
"""Flow validation file path."""
|
||||||
|
@ -687,11 +687,11 @@ class Paths:
|
||||||
fname = f"samples_{simname}_{catalogue}_{inference_method}_"
|
fname = f"samples_{simname}_{catalogue}_{inference_method}_"
|
||||||
|
|
||||||
keys = ["smooth", "nsim", "zcmb_min", "zcmb_max", "mag_selection",
|
keys = ["smooth", "nsim", "zcmb_min", "zcmb_max", "mag_selection",
|
||||||
"sample_alpha", "sample_beta", "sample_Vext", "sample_Vmono",
|
"sample_alpha", "sample_beta", "no_Vext", "sample_Vmono",
|
||||||
"sample_mag_dipole", "sample_curvature",
|
"sample_mag_dipole", "sample_curvature",
|
||||||
"absolute_calibration"]
|
"absolute_calibration"]
|
||||||
values = [smooth, nsim, zcmb_min, zcmb_max, mag_selection,
|
values = [smooth, nsim, zcmb_min, zcmb_max, mag_selection,
|
||||||
sample_alpha, sample_beta, sample_Vext, sample_Vmono,
|
sample_alpha, sample_beta, no_Vext, sample_Vmono,
|
||||||
sample_mag_dipole, sample_curvature, absolute_calibration]
|
sample_mag_dipole, sample_curvature, absolute_calibration]
|
||||||
|
|
||||||
for key, value in zip(keys, values):
|
for key, value in zip(keys, values):
|
||||||
|
|
|
@ -298,7 +298,7 @@ if __name__ == "__main__":
|
||||||
mag_selection = None
|
mag_selection = None
|
||||||
sample_alpha = False if "IndranilVoid_" in ARGS.simname else True
|
sample_alpha = False if "IndranilVoid_" in ARGS.simname else True
|
||||||
sample_beta = None
|
sample_beta = None
|
||||||
sample_Vext = None
|
no_Vext = True
|
||||||
sample_Vmono = False
|
sample_Vmono = False
|
||||||
sample_mag_dipole = False
|
sample_mag_dipole = False
|
||||||
absolute_calibration = None
|
absolute_calibration = None
|
||||||
|
@ -313,7 +313,7 @@ if __name__ == "__main__":
|
||||||
"mag_selection": mag_selection,
|
"mag_selection": mag_selection,
|
||||||
"sample_alpha": sample_alpha,
|
"sample_alpha": sample_alpha,
|
||||||
"sample_beta": sample_beta,
|
"sample_beta": sample_beta,
|
||||||
"sample_Vext": sample_Vext,
|
"no_Vext": no_Vext,
|
||||||
"sample_Vmono": sample_Vmono,
|
"sample_Vmono": sample_Vmono,
|
||||||
"sample_mag_dipole": sample_mag_dipole,
|
"sample_mag_dipole": sample_mag_dipole,
|
||||||
"absolute_calibration": absolute_calibration,
|
"absolute_calibration": absolute_calibration,
|
||||||
|
@ -356,7 +356,7 @@ if __name__ == "__main__":
|
||||||
"beta_min": -10.0, "beta_max": 10.0,
|
"beta_min": -10.0, "beta_max": 10.0,
|
||||||
"sigma_v_min": 1.0, "sigma_v_max": 750.,
|
"sigma_v_min": 1.0, "sigma_v_max": 750.,
|
||||||
"h_min": 0.01, "h_max": 5.0,
|
"h_min": 0.01, "h_max": 5.0,
|
||||||
"sample_Vext": True if sample_Vext is None else sample_Vext, # noqa
|
"no_Vext": False if no_Vext is None else no_Vext, # noqa
|
||||||
"sample_Vmono": sample_Vmono,
|
"sample_Vmono": sample_Vmono,
|
||||||
"sample_beta": sample_beta,
|
"sample_beta": sample_beta,
|
||||||
"sample_h": sample_h,
|
"sample_h": sample_h,
|
||||||
|
|
Loading…
Add table
Reference in a new issue