Skip to content

gh-128: add example of how to use new baryon boost#129

Open
gcanasherrera wants to merge 3 commits into
mainfrom
128-add-example-of-how-to-use-new-baryonboost
Open

gh-128: add example of how to use new baryon boost#129
gcanasherrera wants to merge 3 commits into
mainfrom
128-add-example-of-how-to-use-new-baryonboost

Conversation

@gcanasherrera
Copy link
Copy Markdown
Member

@gcanasherrera gcanasherrera commented Mar 26, 2026

📌 Related Issue

Closes #66 #128

✨ What’s been added or changed?

  • Added example on how to do boosts for baryonic models with the new structure of Perturbations with Mixins

🧪 How was it tested?

📸 Screenshots (if applicable)

f9fa4e80-bce4-42d2-abe2-d1e253df9605

🧠 Anything to keep in mind?

  • Internal structure has changed, but API remains

🔍 Checklist

You can review this PR in ReviewNB, don't forget to log in with your GitHub username:
👉 https://app.reviewnb.com/cloe-org/playground/pulls/

  • I've named the title of this pull request starting by 'gh-#: TITLE'
  • I’ve linked the related issue
  • I’ve tested the code or notebooks manually
  • I’ve added comments/docstrings where needed (i.e: README)
  • I’ve updated relevant docs if necessary

@gcanasherrera gcanasherrera linked an issue Mar 26, 2026 that may be closed by this pull request
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@gcanasherrera gcanasherrera self-assigned this Mar 26, 2026
@gcanasherrera gcanasherrera added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 26, 2026
@gcanasherrera gcanasherrera changed the title gh-128: add example of how to use new baryon boost gh-66: add example of how to use new baryon boost Mar 26, 2026
@gcanasherrera gcanasherrera changed the title gh-66: add example of how to use new baryon boost gh-128: add example of how to use new baryon boost Mar 26, 2026
@gcanasherrera
Copy link
Copy Markdown
Member Author

Could you guys @MatthieuSchaller @PedroCarrilho @garico92 check how do you feel about this notebook?

Please, install locally this branch of cloelib: cloe-org/cloelib#257

@garico92
Copy link
Copy Markdown

garico92 commented Mar 26, 2026

Thanks a lot @gcanasherrera , very useful new features and clear notebook! I have some comments, I randomly list them below:

  • At the beginning of the notebook, I’d suggest the user to install the optional packages they’ll need (HMcodeEmu, BACCOEmu, FLAMINGOemu), just in case they didn’t before. You could just advise to run pip install baccoemu, pip install FlamingoBaryonResponseEmulator…
  • in the baryonic effects explanation, I’d relplace stellar winds with supernovae explosions, as they should have more impact, especially in their interplay with the AGN feedback.
  • In the BACCOemu description: the baryonic_model_name it’s not about set of fiducial parameter, but really loads different emulators: Arico2021 (described in that paper), was trained on 7 BCM parameters and 8 cosmological parameters (including Mnu, w0, wa), but within scales k < 5 Mpc/h and redshifts z < 1.5. Burger2025 (described in the corresponding paper) was trained with higher resolution sims, with wider ranges of scales and redshifts (k < 18 h/Mpc and z < 3), but with a lower number of parameters (5 BCM and 3 cosmological). Note that the k-range of BACCOemu shown in the notebook is extrapolated, not the real emulator’s.
  • BACCOemuNonLinearBaryonicPerturbations runs the BACCOemu nonlinear emulator twice at initialisation. No need to call twice the emulator, it has been trained originally with the boost factor. You can call it once saving computational time using the function self.emu.get_baryonic_boost().
  • When plotting the different suppressions, there’s a weird mixing of calls with and without h-units, I think it’s just confusing, I’d avoid it and call everything homogeneously.
  • Just for plotting purposes, I’d set baccoemu's M1_z0_cen = 12, so that its suppression has the upturn like the other two models and avoid potential questions and doubts.
  • all the power spectra interpolations are in linear space. I think they would be better in log-log space.
  • Also, the extrapolations look quite unphysical. In the BaryonBoostMixin, I'd suggest to use the auxiliary.extrapolator.extend_spectra function with option_wavenumber=“power_law” to improve it, before calling the spline interpolator, analogusously to what done with the nonlinear matter power spectrum. Even doing so, note that doing e.g. BACCOemuNonLinearPerturbations + BACCOemuBaryonBoostMixin would be different wrt calling directly BACCOemuNonLinearPerturbations with baryonic_boost = True, because of the extrapolation.
  • When saying e.g. "with FLAMINGO typically showing the
    largest suppression at $z \sim 0$ and BACCOemu the flattest response." I’d specify that differences shown are specific of the parameters sets chosen, and not absolute.

Here’s the suppressions changing extrapolation method and bacco’s M1_z0_cen:
sks

Thanks again, and sorry for the wall of text!

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add example of how to use new BaryonBoost FLAMINGO emulator example

2 participants