mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2025-01-30 21:31:37 +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,
|
||||
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."""
|
||||
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:
|
||||
beta = 1.0
|
||||
|
||||
if sample_Vext:
|
||||
Vext = sample("Vext", Uniform(Vext_min, Vext_max).expand([3]))
|
||||
else:
|
||||
if no_Vext:
|
||||
Vext = jnp.zeros(3)
|
||||
else:
|
||||
Vext = sample("Vext", Uniform(Vext_min, Vext_max).expand([3]))
|
||||
|
||||
if sample_Vmono:
|
||||
Vmono = sample("Vmono", Uniform(Vmono_min, Vmono_max))
|
||||
|
|
|
@ -671,7 +671,7 @@ class Paths:
|
|||
def flow_validation(self, fdir, simname, catalogue, inference_method,
|
||||
smooth=None, nsim=None, zcmb_min=None, zcmb_max=None,
|
||||
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_curvature=False, absolute_calibration=None):
|
||||
"""Flow validation file path."""
|
||||
|
@ -687,11 +687,11 @@ class Paths:
|
|||
fname = f"samples_{simname}_{catalogue}_{inference_method}_"
|
||||
|
||||
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",
|
||||
"absolute_calibration"]
|
||||
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]
|
||||
|
||||
for key, value in zip(keys, values):
|
||||
|
|
|
@ -298,7 +298,7 @@ if __name__ == "__main__":
|
|||
mag_selection = None
|
||||
sample_alpha = False if "IndranilVoid_" in ARGS.simname else True
|
||||
sample_beta = None
|
||||
sample_Vext = None
|
||||
no_Vext = True
|
||||
sample_Vmono = False
|
||||
sample_mag_dipole = False
|
||||
absolute_calibration = None
|
||||
|
@ -313,7 +313,7 @@ if __name__ == "__main__":
|
|||
"mag_selection": mag_selection,
|
||||
"sample_alpha": sample_alpha,
|
||||
"sample_beta": sample_beta,
|
||||
"sample_Vext": sample_Vext,
|
||||
"no_Vext": no_Vext,
|
||||
"sample_Vmono": sample_Vmono,
|
||||
"sample_mag_dipole": sample_mag_dipole,
|
||||
"absolute_calibration": absolute_calibration,
|
||||
|
@ -356,7 +356,7 @@ if __name__ == "__main__":
|
|||
"beta_min": -10.0, "beta_max": 10.0,
|
||||
"sigma_v_min": 1.0, "sigma_v_max": 750.,
|
||||
"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_beta": sample_beta,
|
||||
"sample_h": sample_h,
|
||||
|
|
Loading…
Add table
Reference in a new issue