Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theory prediction for miscentered haloes #622

Open
wants to merge 78 commits into
base: main
Choose a base branch
from

Conversation

combet
Copy link
Collaborator

@combet combet commented May 7, 2024

Add functionality to compute profile predictions for miscentered haloes, based on tests performed in the exploratory notebook explore_miscentering_theory.ipynb

  • new functionality added to the theory module
  • the theory demo notebooks (functional interface and OO) updated accordingly
  • new tests implemented

combet and others added 17 commits April 19, 2023 14:32
…611)

* Add missing use_weights option to notebook to get expected behaviour

* Update version to 1.11.1

---------

Co-authored-by: m-aguena <[email protected]>
* distinguish between compute_beta_s_*_from_distribution and compute_beta_s_*_from_weights

* make compute_beta more efficient and fix shape_weights=None in compute_beta_s_mean*_from_weights

* add _eval_da, _eval_da_z1z2, _get_z_from_a, _get_a_from_z to cosm

* reorder funcs in cosmo parent

* add fix to skip pylint for astropy.units (fails in astropy 6)

* Update version to 1.12.0

---------

Co-authored-by: m-aguena <[email protected]>
@coveralls
Copy link

coveralls commented May 7, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling 6ebe1aa on issue/588/miscentering_therory
into 721e2d9 on main.

@combet
Copy link
Collaborator Author

combet commented May 7, 2024

@m-aguena, @marina-ricci, @hsinfan1996 - following on the v2.0 release discussion and the idea of having miscentered profiles predictions part of the release, I'm thinking one compromise would be to implement the miscentered profile for a single halo (i..e not integrated over a miscentering distribution). This is in any case what we have currently in theory, i..e we don't deal with prediction for stacked profiles (that will most likely live in FireCrown/new CLcosmo prediction module?).

There are 2 routes to do so, both shown in the explore_miscentering_theory.ipynb

  1. rely on the backends to compute Sigma and then the integrals brute-force (the very slow option I originally implemented can be sped up using @hsinfan1996's optimized integration for DeltaSigma without loss of precision)
  2. implement the backend-independent version from @hsinfan1996, which uses analytical pre-computations of the miscentered surface density to speed up the process, i.e. backend-independent. This is the fastest, but needs more code to be added to the theory module.

I like option 2 better because of speed, but it would also make that part less consistent "in spirit" with the rest of the theory module that relies on the backends...

What do you think?

@combet combet linked an issue May 8, 2024 that may be closed by this pull request
@hsinfan1996 hsinfan1996 force-pushed the issue/588/miscentering_therory branch from 97b48c7 to 461c3d7 Compare July 19, 2024 23:26
@combet combet marked this pull request as ready for review October 16, 2024 13:06
Copy link
Collaborator

@m-aguena m-aguena left a comment

Choose a reason for hiding this comment

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

It all looks good. Thanks for all the hard work! (Just remember to clean the merge comment because it is huge)

@marina-ricci marina-ricci self-assigned this Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: PR to do
Development

Successfully merging this pull request may close these issues.

Add miscentering to the theory module
8 participants