Skip to content
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

Emu pk #1094

Merged
merged 63 commits into from
Jul 10, 2023
Merged

Emu pk #1094

merged 63 commits into from
Jul 10, 2023

Conversation

matteozennaro
Copy link
Contributor

Enable passing linear and nonlinear pk emulators to the cosmology class (baccoemu and euclid emulator 2 implemented for now, generic emulator class introduced extendable to other emulators). Added baccoemu baryonic effect emulator to baryons class.

@damonge
Copy link
Collaborator

damonge commented Jul 5, 2023

@matteozennaro flake8 is failing (from experience, best run this on your machine before pushing). Do flake8 pyccl/ and flake8 benchmarks/ and solve all the issues that pop up.

@damonge
Copy link
Collaborator

damonge commented Jul 5, 2023

The tests are failing because they can't import baccoemu. Try getting it to install by adding it here: https://github.com/LSSTDESC/CCL/blob/master/.github/environment.yml

Copy link
Collaborator

@damonge damonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @matteozennaro . This was super quick and it's really great to have these implemented. Just a few comments below.

pyccl/baryons/baccoemu_baryons.py Show resolved Hide resolved
pyccl/baryons/baccoemu_baryons.py Show resolved Hide resolved
pyccl/baryons/baccoemu_baryons.py Show resolved Hide resolved
pyccl/baryons/baccoemu_baryons.py Outdated Show resolved Hide resolved
pyccl/baryons/baccoemu_baryons.py Outdated Show resolved Hide resolved
pyccl/emulators/baccoemu_nonlinear_pk.py Show resolved Hide resolved
pyccl/emulators/ee2_nonlinear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/baccoemu_linear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/baccoemu_nonlinear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/ee2_nonlinear_pk.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jul 5, 2023

Pull Request Test Coverage Report for Build 5510615878

  • 197 of 200 (98.5%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 97.578%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyccl/baryons/baccoemu_baryons.py 64 65 98.46%
pyccl/emulators/baccoemu_linear_pk.py 53 54 98.15%
pyccl/emulators/baccoemu_nonlinear_pk.py 48 49 97.96%
Totals Coverage Status
Change from base Build 5199196746: 0.04%
Covered Lines: 5318
Relevant Lines: 5450

💛 - Coveralls

Copy link
Collaborator

@damonge damonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, a few more things. Once this is done I'll suggest a couple extra tests to improve the code coverage, and we're done.

pyccl/baryons/baccoemu_baryons.py Show resolved Hide resolved
pyccl/cosmology.py Show resolved Hide resolved
pyccl/emulators/baccoemu_linear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/baccoemu_nonlinear_pk.py Show resolved Hide resolved
pyccl/emulators/ee2_nonlinear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/baccoemu_linear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/baccoemu_nonlinear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/ee2_nonlinear_pk.py Outdated Show resolved Hide resolved
pyccl/emulators/baccoemu_nonlinear_pk.py Outdated Show resolved Hide resolved
… expansion factors used to create the 2d interpolator of the nonlinear pk emulators not hardcoded
@hsinfan1996
Copy link
Contributor

May be related lesgourg/class_public#416

…king because of pip installation of ee2 and class version for aemulus). Will be reintroduced later in a dedicated pull request.
Copy link
Collaborator

@damonge damonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed these two things

.github/environment.yml Outdated Show resolved Hide resolved
benchmarks/data/aemulus_heft_nonlinear.txt Outdated Show resolved Hide resolved
Copy link
Collaborator

@damonge damonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@matteozennaro matteozennaro merged commit b4f6b70 into master Jul 10, 2023
@matteozennaro matteozennaro deleted the emu_pk branch July 10, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants