gw/likelihood.py: prior type
Hi,
there may be a slight issue in testing prior type in gw/likelihood.py
: the prior setter at https://git.ligo.org/Monash/tupak/blob/master/tupak/gw/likelihood.py#L110 makes prior
an empty dict()
if prior=None
. This cause the check _check_prior_is_set(self)
at https://git.ligo.org/Monash/tupak/blob/master/tupak/gw/likelihood.py#L102 to pass even when the likelihood class is initialised with prior=None
.
In addition, it seems that this _check_prior_is_set(self)
should not be needed as _setup_distance_marginalization()
and _setup_phase_marginalization()
can add a default prior in the event it's missing. And the calls to prior[<param>] = 0
at https://git.ligo.org/Monash/tupak/blob/master/tupak/gw/likelihood.py#L70 and https://git.ligo.org/Monash/tupak/blob/master/tupak/gw/likelihood.py#L76 should instead be self.prior[<param>] = 0
I need to add the disclaimer: my overwhelming prior belief is that I simply mis-read the code as while trying to understand it...