Skip to content

Conversation

@raxquax123
Copy link
Contributor

Hello! I hope this isn’t presumptuous, but I’ve also done a bit of testing/updating on the other tutorial notebooks!
All ran straight through with no changes apart from mini-halos.ipynb and relative-velocities.ipynb.

It was mostly updating the calling parameters of functions, similarly to lightcones.ipynb, but there were a couple things to note that I’m not sure whether they need to be separately addressed (or not):

  • It looks like L_X_MINI and F_H2_SHIELD are set to their max value already - multiplying them by factors > 1 returns an error.
    • I’ve ‘fixed’(?) this by simply not allowing the multiplying factor to be > 1 for these parameters. Not sure if this is just a bandaid solution, but everything ran smoothly upon doing so!
  • Setting inputs_acg = inputs.evolve_input_structs(USE_MINI_HALOS=False) appears to be incompatible with simulating J_21_LW - it returns a ValueError:

    ValueError: You asked for J_21_LW but it is not computed for the inputs

  • but this doesn’t appear for the fiducial lightcone.
  • initial_conditions - I’ve changed to explicitly have write=True, else it doesn’t write to cache (and can’t be accessed later in runcache)
  • ‘L_X_MINI' must be > 0 - I’ve changed multiplicative factor in use-mini-halos.ipynb to 0.0000001 (i.e. small but non-zero).

This is less of a bug and just an aesthetics/ease-of-reading question, but in relative-velocities.ipynb, the cell below the markdown title ’21-cm power spectra’ just output the same plots four times whilst not varying any input parameters, so I’ve changed it to only plot each chunk once! Let me know if I’ve done this erroneously :)

I’ve also re-run all of the cells in relative-velocities.ipynb, as a pre-existing keyboard interrupt message meant that a lot of the figures weren’t generated already! (However, mini-halos.ipynb had all figures pre-generated, so I just tested the code with smaller runs in a separate notebook, then copy-pasted any changes over, and left the original figures in.)

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.46%. Comparing base (ff6aeab) to head (0f12d9f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
- Coverage   80.51%   80.46%   -0.06%     
==========================================
  Files          26       26              
  Lines        3783     3783              
  Branches      604      604              
==========================================
- Hits         3046     3044       -2     
- Misses        554      555       +1     
- Partials      183      184       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@steven-murray
Copy link
Member

Wow, this is great, thanks! I'll try and get to reviewing the changes soon :-)

@steven-murray
Copy link
Member

Hi @raxquax123, sorry it has been a while since you made this PR -- we've been doing a lot of background work on the code, and made some reasonably significant API changes in the meantime.

I appreciate the changes you've made here, but I think actually we probably want to rethink these notebooks entirely. I think documentation notebooks should be runnable in a Hubble time, so we might need to think about how to best present these models.

@daviesje what do you think?

@raxquax123
Copy link
Contributor Author

Hello @steven-murray! No worries at all, feel free to disregard this PR if it is no longer useful :) If I can be of any use in the reworking of the notebooks please do let me know!!!

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.

2 participants