Skip to content

Added checks for Constraint objects and resolved duplicate construction of PriorDict.

Karl Wette requested to merge (removed):Constraint-PriorDict into master

Changes needed to use Bilby prior constraints with CWInPy:

  • The isinstance(self.priors[...], bilby.core.prior.Constraint) checks prevent CWInPy from checking whether the constraint is a known physical parameter of the CW model, which may not be the case.
  • The elif not isinstance(self.prior, bilby.core.prior.PriorDict) check prevents a PriorDict being passed to itself, because in that case the conversion_function needed for prior constraints is lost. (Put another way, PriorDict.__init__() is not a copy constructor.)

Merge request reports