Ability to inject initial conditions (only density field)#613
Ability to inject initial conditions (only density field)#613jordanflitter merged 10 commits intomainfrom
Conversation
…_global_evolution
…amine the linear growth factor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #613 +/- ##
==========================================
+ Coverage 88.13% 88.16% +0.03%
==========================================
Files 32 32
Lines 4729 4741 +12
Branches 796 800 +4
==========================================
+ Hits 4168 4180 +12
Misses 401 401
Partials 160 160 ☔ View full report in Codecov by Sentry. |
steven-murray
left a comment
There was a problem hiding this comment.
Thanks @jordanflitter this is almost there, we discussed just now the following:
- Changing the name of the
hires_density_arrayparameter - Changing the
with_value_not_computedto be private - Updating
compute_xray_source_fieldto use your approach - Adding your paper (and others) to
show_references() - Adding a small section to a new tutorial that promotes your new feature.
…rror if it is not in the right dimensions
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Thanks @steven-murray for your comments! I renamed some of the variable + function names, and I also updated the tutorials and the faq to give more information on the new features, as we discussed. Unfortunately, we cannot at the moment get rid of the As for your last two comments (include my paper in |
This PR implements two new more features.
The first one is the ability to inject
hires_density_arraytop21c.compute_initial_conditions. If a non-zero array is injected, then the usual Gaussian sampling in Fourier space is skipped, and then the rest of the computation continues. As before, this modifiedinitial_conditionscan then be used as an input torun_coeval(orrun_lightcone) in order to make a "roundtrip test", something that could be useful for @nikos-triantafyllou's project.The second new feature is the ability to
run_global_evolutionwithdelta_z0which is not necessarily 0. This could be helpful in making (speedy) linear perturbation theory* with21cmFAST.*Note that this is a scale-independent perturbation theory, since we currently assume that the density field evolves in a scale-independent manner (as we simply multiply it by the scale-independent growth factor). This is actually not true in the dark ages, where the baryon density field evolves in a scale-dependent manner (unlike CDM, which roughly evolves in a scale-dependent manner), but this will wait for another PR