-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for non-linear models #198
Conversation
@marcpaterno, @vitenti Do you have comments or suggestions on the overall structure of the implementation? There's still quite some clean-up to do but I want to make sure you're on board with the design before investing more time in writing and changing the code. |
@tilmantroester We are still reviewing the code structure and figuring out how to better integrate with design we were developing for the toolset. |
@tilmantroester We have just cut firecrown release v1.3.0, containing (among other things) the new version of the likelihood "factory script". Would you like this code to make it into a v1.4.0, which we could cut in the next week or two? As of our last meeting, our plan was to release this code to be used in the forecasting project (DESC project 291) and to make the generalization/refactoring we discussed as a task to be done after that release. |
I'm busy until next week but after that I'll try to get this ready to be reviewed. I'm hoping to get this done before the holidays, so that we have the models ready for the forecasting project. |
This should now be ready to be looked at again. I've added a unit test which automatises the example scripts. This should now also handle combinations of PT and non-PT tracers, following a similar approach to @paulrogozenski. One thing to discuss is whether to use the |
This is now finally passing all tests. |
This is a draft implementation to address #174 based on discussions with @jablazek, @paulrogozenski, @chrgeorgiou. It currently supports perturbative IA and galaxy bias models but it should be extendable to halo-model-based models. An example (
examples/des_y1_3x2pt/des_y1_3x2pt_PT.py
) showcases this functionality and compares the results to a direct CCL calculation of the same quantities. They seem to match well!Allowing support for non-linear quantities requires extensive changes to how firecrown handles two-point statistics and passes around cosmology objects. The main changes are
CosmologyBundle
class that bundles theccl.Cosmology
object with associated data, such as PT calculators. This class gets passed around ascosmo
instead of theccl.Cosmology
object downstream of the top-levelLikelihood
call.TracerBundle
class that bundles accl.Tracer
object with information about the associated 3D field andccl.nl_pt.PTTracers
, where relevant.CosmoSystematicsLikelihood
likelihood class that can account for cosmology-level systematics. The concrete example here is the new classPTSystematic
, which populates the PT workspaces and computes the basic perturbative quantities that are later used inTwoPoint.compute
Source.create_tracer
andTwoPoint.compute
work to deal with the multiple tracers that are now required perSource
TattAlignmentSystematic
andPTNonLinearBiasSystematic
systematic that make use of all this new functionalitynumber_counts.py
to more generally deal with magnification biasA plot showing the agreement with CCL:
This PR currently uses the
pt_enh
branch of CCL, since it required some extra functionality there.