Hotfix for dynesty bounds
The changes in !592 (merged) revealed an error in the handling of reflective bounds.
Previously, we had been using a minimum/maximum
trick to reflect points back into the unit cube. But, this fails for cases where u > 2
which get reflected to <0
. The problem however did not arise previously because we where applying the reflection once in dynesty and once in bilby itself. Thus, we reflected it twice, fixing the issue. In principle, a point could jump far enough out and cause it to fail, but the probability of this occuring where sufficiently small that it was likely ignored when it happened.
In !592 (merged), we removed the "bilby" reflection, causing this issue to rear its head [1]. This MR resolves the issue by defining properly the reflection function (see the addition in utils). Credit to @colm.talbot for figuring that out.
For the time being we will resolve this in the bilby side of things, once it is tested and we are sure it is correct, we will submit a MR to dynesty to resolve it internally.
[1] For future rererence, it manifests as a message like
raise ValueError("Number to be rescaled should be in [0, 1]")
ValueError: Number to be rescaled should be in [0, 1]