Skip to content

gh-563: Add Pcb support for Cl computations in massive neutrino cosmologies - #564

Open
matteobaratto wants to merge 4 commits into
mainfrom
feature/add_pcb_to_cl
Open

gh-563: Add Pcb support for Cl computations in massive neutrino cosmologies#564
matteobaratto wants to merge 4 commits into
mainfrom
feature/add_pcb_to_cl

Conversation

@matteobaratto

@matteobaratto matteobaratto commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

🚀 Pull Request Checklist

✅ Summary

The Pcb matter power spectrum has already been implemented in the library. However, the Cl computation pipeline currently always uses the total matter power spectrum (Pmm) and does not expose the possibility of selecting an alternative power spectrum.

Some applications, such as cosmological analyses including massive neutrinos, require different choices of matter power spectrum depending on the observable. For example, galaxy clustering may require the use of the cold dark matter + baryon power spectrum (Pcb), while galaxy-galaxy lensing may require a combination such as sqrt(Pmm * Pcb).

🔄 Changes

  • Add use_Pcb flag inside PositionTracer
  • Propagate Pcb insisde AngularPowerSpectrum

🛠 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 #563

📸 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) - docstrings & instructions in cloelib/docs/
  • 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 (docstrings & instructions in cloelib/docs/)
  • Check that the corresponding branch has been deleted after merging. If not, delete it

@gcanasherrera gcanasherrera changed the title gh-563 Add Pcb support for Cl computations in massive neutrino cosmologies gh-563: Add Pcb support for Cl computations in massive neutrino cosmologies Jul 31, 2026

@gcanasherrera gcanasherrera left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One question

isinstance(self.tracer2, PositionsTracer)
and getattr(self.tracer2, "use_Pcb", False)
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any chance we could jaxify this @matteobaratto @marcobonici ?

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.

Add Pcb support for Cl computations in massive neutrino cosmologies

2 participants