Store analytic bilby priors when `--disable_prior_sampling` is passed
If I run the following command line,
$ summarypages --webdir ./webpage --samples bilby.json --labels prior_sampling --multi_process 4 --gw --nsamples_for_prior 1000 --disable_expert
The analytic bilby priors are stored in the pesummary
metafile:
>>> import h5py
>>> f = h5py.File("webpage/samples/posterior_samples.h5", "r")
>>> f["prior_sampling"]["priors"]["analytic"]
<HDF5 group "/one/priors/analytic" (108 members)>
>>> f.close()
However, if the --disable_prior_sampling
is provided,
$ summarypages --webdir ./webpage --samples bilby.json --labels no_prior --multi_process 4 --gw --disable_prior_sampling --disable_expert
The analytic bilby priors are not stored in the pesummary
metafile:
>>> import h5py
>>> f = h5py.File("webpage/samples/posterior_samples.h5", "r")
>>> f["no_prior"]["priors"]["analytic"]
...
KeyError: "Unable to open object (object 'analytic' doesn't exist)"
>>> f.close()
This seems like a design flaw. I think the analytic priors should always be saved if they are available in the bilby
json file.
Edited by Charlie Hoy