Distance prior maximum not updating properly
I have initialized and updated a prior on the luminosity_distance
as follows:
>>> priors = bilby.gw.prior.BBHPriorDict()
12:36 bilby INFO : No prior given, using default BBH priors in /home/sylvia.biscoveanu/.local/lib/python3.7/site-packages/bilby-0.6.5-py3.7.egg/bilby/gw/prior_file
s/binary_black_holes.prior.
>>> priors['luminosity_distance'].minimum
100.0
>>> priors['luminosity_distance'].maximum
5000.0
>>> priors['luminosity_distance'].minimum = 1000
>>> priors['luminosity_distance'].maximum = 7000
>>> priors['luminosity_distance']
UniformSourceFrame(minimum=1000, maximum=7000, cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[0. 0. 0.0
6] eV, Ob0=0.0486), name='luminosity_distance', latex_label='$d_L$', unit=Unit("Mpc"), boundary=None)
When I sample from this prior, I get the distribution in blue in the plot attached. When I define an identical prior from scratch instead of updating the one that is instantiated by the BBHPriorDict, I get the correct behavior, shown in orange in the plot.
>>> test = priors['luminosity_distance'].sample(10000)
>>> min(test)
1000.3898319385621
>>> max(test)
6913.146268753098
>>> test_prior = bilby.gw.prior.UniformSourceFrame(minimum=1000, maximum=7000, name='luminosity_distance', latex_label='$d_L$', unit="Mpc", boundary=None)
>>> test2 = test_prior.sample(10000)
So something is going wrong with how the UniformSourceFrame prior is updating the maximum value. The minimum seems to behave fine when I update it after instantiation.