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

CosmicEmu 2017 #1103

Merged
merged 21 commits into from
Jul 14, 2023
Merged

CosmicEmu 2017 #1103

merged 21 commits into from
Jul 14, 2023

Conversation

damonge
Copy link
Collaborator

@damonge damonge commented Jul 13, 2023

This implements the older version of CosmicEmu that we already had at the C level.

Here's a list of changes:

  • Implemented the 2017 version of CosmicEmu, using the same framework we used in CosmicEmu MiraTitanIV #1102 . For this, I've created a base class for Cosmicemu, made the 2022 version into a child class, and the new 2017 one into another child class. They both live in the same file. Unfortunately github is noting all code in that file as new, but the 2022 code is actually unchanged.
  • Removed the C-level implementation of the same emulator, and removed it as an option in the Cosmology object. From now on, users who want to use CosmicEmu will need to pass it as any of the other emulators. Note that I've left the old benchmark test in place, but now using the python implementation, to demonstrate that we achieve the same precision as with the old implementation.
  • I realised there were still a bunch of deprecated flags at the C level (to do with the halo mass function, concentration-mass relation, and baryonic effects). I've removed those.
  • I've removed the caching option inside the cosmology object methods (which was not being exploited anyway). This is because it led to unwanted caching of non-linear power spectra generated with different emulators (and is an example of how careful we need to be if we ever need to benefit from this).

@coveralls
Copy link

coveralls commented Jul 13, 2023

Pull Request Test Coverage Report for Build 5552350593

  • 140 of 140 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 97.429%

Totals Coverage Status
Change from base Build 5545864318: 0.02%
Covered Lines: 5646
Relevant Lines: 5795

💛 - Coveralls

@damonge damonge marked this pull request as ready for review July 13, 2023 21:04
benchmarks/test_emu.py Outdated Show resolved Hide resolved
benchmarks/test_emu.py Outdated Show resolved Hide resolved
@damonge damonge merged commit 1ed02d9 into master Jul 14, 2023
4 checks passed
@damonge damonge deleted the cosmicemu_MTII branch July 14, 2023 10:48
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.

None yet

3 participants