Closed kimmywu closed 3 years ago
I'm looking at it - it's caused by setting nnu/YHe via extra_args, which we should be able to fix. (but I guess you don't really want only 2 neutrinos anyway!?)
Btw, likelihoods should only depend on C_l not cosmological parameters, so better to fix those params in the yaml.
@cmbant thanks for the quick response. The number of neutrinos doesn't matter for what I'm doing, but I agree that 3.046 is more standard.
Btw, likelihoods should only depend on C_l not cosmological parameters, so better to fix those params in the yaml.
Yeah, I had other iterations that had a separate simplelike.yaml file to define the parameters. But in the readthedocs, this example teaches us to put parameters in the likelihood class definition:
class MyLikelihood(Likelihood):
cl_file = "/path/do/data_file"
# Aliases for automatic covariance matrix
aliases = ["myOld"]
# Speed in evaluations/second (after theory inputs calculated).
speed = 500
params = {"my_foreground_amp":
{"prior": {"dist": "uniform", "min": 0, "max": 0},
"ref" {"dist": "norm", "loc": 153, "scale": 27},
"proposal": 27,
"latex": r"A^{f}_{\rm{mine}"}}
Is this an exception or should this example be removed as this is not advisable? Or do you just mean the LCDM parameters shouldn't be in the likelihood definition?
Likelihood-specific parameters should be in the likelihood, but not LCDM/cosmology/camb parameters, since likelihoods only depend on them indirectly via C_l.
Fixed. Thanks!
Hello,
I am testing the minimizer by sampling 1 (non-CAMB) parameter
r_free
with the rest of the CAMB input parameter fixed. Since I am not sampling the CAMB parameters, the output spectra (and in this case Cl['bb']) should remain the same. However the output fromtheory.get_Cl()
are not the same before and afterStarting Minimization
.I plotted the two Clbb outputs before and after minimization started:
The following shows part of the debug output. The likelihood on the same set of parameters was calculated before and after minimization was launched, with
'r_free': 0.2136268061607224
(and all other parameters fixed). Because of the difference in the output clbb from CAMB, the log-likelihood changed value.I have included a minimum working example that reproduces this phenomenon: likelihood definition and yaml file.
Please advise. Thanks!