Currently, in the white_noise_block function, if vary=False the efac, equad and ecorr values are set as Constant parameters without a given value for that constant. This means that the constant value will default to None. The docstring suggests that the constant values can be set later, but in a function such as model_singlepsr_noise, if white_vary=False these constants don't get set and subsequent likelihood calls on the returned pta object fail due to the constants returning None.
This PR attempts to fix this by setting some default values for the constants. In this case a value of 1.0 for efac and -inf for both equad and ecorr. This (assuming I understand things correctly!) would mean that the likelihood just uses the TOA errors as given as the standard deviations in the likelihood calculation (without any scaling, additional component, or correlation).
Currently, in the
white_noise_block
function, ifvary=False
theefac
,equad
andecorr
values are set asConstant
parameters without a given value for that constant. This means that the constant value will default toNone
. The docstring suggests that the constant values can be set later, but in a function such asmodel_singlepsr_noise
, ifwhite_vary=False
these constants don't get set and subsequent likelihood calls on the returnedpta
object fail due to the constants returningNone
.This PR attempts to fix this by setting some default values for the constants. In this case a value of
1.0
forefac
and-inf
for bothequad
andecorr
. This (assuming I understand things correctly!) would mean that the likelihood just uses the TOA errors as given as the standard deviations in the likelihood calculation (without any scaling, additional component, or correlation).See also https://github.com/nanograv/enterprise/pull/379.