LSSTDESC / firecrown

DESC Cosmology Likelihood Framework
BSD 3-Clause "New" or "Revised" License
29 stars 7 forks source link

Remove passing of ParamsMap from Likelihood.compute_loglike #147

Closed marcpaterno closed 2 years ago

marcpaterno commented 2 years ago

In the new design of Firecrown, the method Likelihood.compute_loglike takes as an argument only the cosmology for which the likelihood is to be evaluated. The other parameters of the likelihood are set by a previous call to Likelihood.update. The passing of the ParamsMap is now a vestige of the older design and should be removed.

vitenti commented 2 years ago

I just created a new branch and PR fixing this issue. I had also to modify the caching code for the traces since they used the params to create a hash, now it only uses the CCL cosmology object. Instead of hashing the parameters, now every time _update is called it automatically erases the cache, that is, we need new tracers when in a different point of the parametric space.