Commit a104f11a authored by Colm Talbot's avatar Colm Talbot
Browse files

fix use of delta function priors

parent c3929149
Pipeline #224590 failed with stages
in 3 minutes and 48 seconds
......@@ -369,6 +369,7 @@ likelihood = setup_likelihood(
priors=priors,
args=args,
)
priors.convert_floats_to_delta_functions()
logger.setLevel(logging.INFO)
......@@ -396,8 +397,6 @@ sampling_keys = []
for p in priors:
if isinstance(priors[p], bilby.core.prior.Constraint):
continue
if isinstance(priors[p], (int, float)):
likelihood.parameters[p] = priors[p]
elif priors[p].is_fixed:
likelihood.parameters[p] = priors[p].peak
else:
......@@ -413,14 +412,6 @@ for ii, key in enumerate(sampling_keys):
logger.debug("Setting reflective boundary for {}".format(key))
reflective.append(ii)
# Setting marginalized parameters to their reference values
if likelihood.phase_marginalization:
likelihood.parameters["phase"] = priors["phase"]
if likelihood.time_marginalization:
likelihood.parameters["geocent_time"] = priors["geocent_time"]
if likelihood.distance_marginalization:
likelihood.parameters["luminosity_distance"] = priors["luminosity_distance"]
if input_args.dynesty_sample == "rwalk":
logger.debug("Using the bilby-implemented rwalk sample method")
dynesty.dynesty._SAMPLING["rwalk"] = bilby.core.sampler.dynesty.sample_rwalk_bilby
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment