Skip to content
Snippets Groups Projects
Commit 40937470 authored by Colm Talbot's avatar Colm Talbot
Browse files

fix fill_priors to deal with bad waveform generator variables

parent 33059813
No related branches found
No related tags found
1 merge request!23implement prior generation
......@@ -382,10 +382,15 @@ def fill_priors(prior, waveform_generator, fixed=None):
print("{} cannot be converted to delta function prior.".format(key))
print("If required the default prior will be used.")
bad_keys.append(key)
for key in bad_keys:
prior.pop(key)
missing_keys = set(waveform_generator.parameters) - set(prior.keys())
for missing_key in missing_keys:
prior[missing_key] = create_default_prior(missing_key)
if prior[missing_key] is None:
print("No default prior found for unspecified variable {}.".format(missing_key))
print("This variable will NOT be sampled.")
bad_keys.append(missing_key)
for key in bad_keys:
prior.pop(key)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment