Skip to content

gh-404: Implement mochi class emulator - #417

Open
LisaGoh wants to merge 47 commits into
mainfrom
404-implement-mochi_class-emulator
Open

gh-404: Implement mochi class emulator#417
LisaGoh wants to merge 47 commits into
mainfrom
404-implement-mochi_class-emulator

Conversation

@LisaGoh

@LisaGoh LisaGoh commented Jan 30, 2026

Copy link
Copy Markdown
Collaborator

🚀 Pull Request Checklist

✅ Summary

This PR solves issue #404.

🔄 Changes

Incorporated an emulator for the linear power spectrum calculated by mochi_CLASS (the mochiCLASSEmuLinearPerturbations class), trained using Cosmopower. Currently, it is implemented for the stable basis parametrisation of Lombriser et al. 2019 (varying s, a0, a1) + w0wacdm background (w0,wa), for fixed cosmology parameters (Planck 2018 fiducial). It currently only returns the linear matter power spectrum (no sigma8, nor fsigma8).

🛠 How to Test

📝 Documentation

  • This PR updates documentation
  • This PR does not require documentation changes
  • Issue created for documentation update: Don't forget to link the task!

🏗 Related Issues

Resolves #404

📸 Screenshots (if applicable)

📌 Additional Notes


✅ PR Checklist for Developers

  • I have titled this PR before merging as "gh-#:", where "#" represents the task it closes
  • I have run locally pre-commit using pre-commit run --all-files
  • I have tested my changes locally
  • No new warnings or errors introduced
  • I have updated documentation (if applicable)
  • My changes do not introduce breaking changes (i.e: the package still gets installed)
  • I have added unit tests (if applicable)
  • I have consistently updated the GitHub information for the project, including milestones, task types, and other relevant details.

✅ PR Checklist for Reviewers

  • The next PR targets the correct branch
  • CI tests have run and passed for the latest commit on the source branch
  • Check that the code can still be installed if new packages are imported
  • If necessary, the notebooks in the playground will be updated in a corresponding follow-up PR
  • Coverage percentage is retained or increased
  • Quality of new/changed code is acceptable
  • Quality of new/changed unit tests is acceptable
  • No data files have been included in the commits
  • Implementation follows the agreed task description point by point
  • Check that any added folder/file has been added to the README.md file
  • Check that the documentation has been updated accordantly
  • Check that the corresponding branch has been deleted after merging. If not, delete it

LisaGoh and others added 26 commits October 22, 2025 10:56
first commit; added mochi_class protocol file
Sorry my bad I realised doing this would break compatibility with the rest of the Background Protocols, so I fixed the bug in the mochi_class_cosmology.py script instead!
So that cloelib would not throw an TypeError when the Omega_m(z) method is called in photo.py
@LisaGoh
LisaGoh requested a review from gcanasherrera January 30, 2026 15:32
@LisaGoh LisaGoh linked an issue Jan 30, 2026 that may be closed by this pull request
@LisaGoh LisaGoh changed the title gh-#404: Implement mochi class emulator gh-404: Implement mochi class emulator Jan 30, 2026
@LisaGoh LisaGoh self-assigned this Jan 30, 2026
@gcanasherrera gcanasherrera added this to the v0.11 milestone Mar 21, 2026
@gcanasherrera gcanasherrera added background-perturbations Tasks related to Background and Perturbations th-1 labels Apr 26, 2026
@gcanasherrera

Copy link
Copy Markdown
Member

This needs to be updated when #352 is merged.

@LisaGoh

LisaGoh commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Heyoo @gcanasherrera I've updated this branch since #352 is now closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

background-perturbations Tasks related to Background and Perturbations th-1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement mochi_class emulator

3 participants