LSSTDESC / firecrown

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

Add a sacc-less utility "likelihood" #195

Open tilmantroester opened 2 years ago

tilmantroester commented 2 years ago

Right now the likelihoods in firecrown require a sacc object to compute anything. It would be nice to have a utility likelihood that takes in a list of ell (or theta) values, a collection of n(z), what kind of statistic should be computed, and then assembles a corresponding sacc object internally. That likelihood would then just compute the predicted data vector and not implement compute_chisq. The use case I have in mind is model exploration and testing, for which a measured data vector and covariance is not necessary and adds an unnecessary burden on the user to set up a sacc object themselves.

tilmantroester commented 8 months ago

I'd like to revisit this. Right now the GaussFamily likelihoods need a sacc file with a data vector and covariance. For model development and testing, this is not necessary and might be bothersome to obtain (especially the covariance). I'd like a Likelihood class that just implements

It's not clear how to implement that cleanly with the current setup though. I think it would be natural to subclass Likelihood for this but both compute_theory_vector and make_realisation are already implemented in GaussFamily and wouldn't need to be changed. On the other hand, GaussFamily has a lot of other functionality that makes no sense if there are no data vectors or covariances. An option would be to have something like a TheoryOnlyLikelihood that is a subclass of Likelihood, which implements a rudimentary read, as well as compute_theory_vector and make_realisation. GaussFamily then subclasses TheoryOnlyLikelihood.