-
Notifications
You must be signed in to change notification settings - Fork 69
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
IA profile v3 #1074
IA profile v3 #1074
Conversation
* Added new baryons module that will deprecate old BCM
* Tracers in V3
* Background, boltzmann and cls in v3
* Covariances in V3
* Correlations in v3
* done * Make `T_ncdm` a cosmological parameter + (v3) (#1049) * first commit * rename TNCDM to T_ncdm but preserve API * T_CMB directly into cosmo struct * Omega_g in ccl_parameters_create; no split between C/Python * physical_constants.T_CMB doesn't mutate anymore! * force mutate T_CMB in benchmarks * define defaults on instantiation just in case constants mutate * A_s & sigma8: don't play with numbers * simplify * remove leftover mallocs * temporarily preserve API for CCLv3 * Unfreeze option for `physical_constants` (#1050) * first commit * update rtd * addressed comments 1 * Remove `T_CMB` and `T_ncdm` as constants (reloaded) (#1058) * first commit * OmNuh2 fix * addressed comments * keep only massive * first step * temp commit * debug neutrinos & deprecate Omnuh2 * ccl_omega_x & ccl_Omeganuh2 consistency --------- Co-authored-by: David Alonso <[email protected]> * RTD: Removed The Docs --------- Co-authored-by: David Alonso <[email protected]> * flaked --------- Co-authored-by: Nick Koukoufilippas <[email protected]>
* tk3d and pk2d in v3 --------- Co-authored-by: Nick Koukoufilippas <[email protected]>
* New PT bias framework
* ported changes in halos/profiles * changes from star in halos/ (no tests) * refactor concentration, mass_function, halo_bias; improvements in HMCalculator * HaloProfile subclasses & HaloProfile.normprof attribute * simplify imports * remove HaloProfile.name * cleaned up pk_Npt * add extrap_pk argument * FFTLogParams class instead of dictionary in HaloProfile * simplified code * removed mass_def from HMIngredients; comprehensive code review 1 * re-implementation, bugfixes, tests * c_m_relation >> concentration; code improvements; A_SPLINE_MAX in Python * HMIngredients initializers - no repeated code * rogue file * patch for new changes * updated Build Status badge website * fix websites * added a DOI badge & links * added nonbreaking space * removed extra space * FancyRepr out of CCLObject to simplify * update tests to match changes * coverage * simple test for tkkssc * more tests for tkkssc * addressed comments 1 * addressed comments 2: mass_def defaults are name strings etc. * deprecate Gaussian & PowerLaw profiles * bugfix in master: sometimes mass_def_strict=False fails unexpectedly * typo * addressed comments * New feature: Arbitrary function for profile normalization * gain efficiency * comments + deprecate k_min from HMCalculator * renamed initialize_from_input --> create_instance * brought in CCLNamedClass from docs_v3 * brought in from docs_v3: directly callable HMIngredients * prep for Davids input * renamed HMCalculator --> HaloModel * fix typo * brought in from docs_v3: initialize mass_def from any string (e.g. 400c) * Revert "renamed HMCalculator --> HaloModel" This reverts commit 43591ce. * counterterms func inside of 4pt func * replace deprecated abstractproperty * abstract linked methods for HaloProfile, MassFunc, HaloBias, Concentration * fully working implementation * renamed lM --> log10M etc. * minor cosmetic fix * alternative way to include linked abstract methods and declare the template methods * reorder * even simpler * bring back eq_attrs * r -> r_t * Additional halos features (#1068) * first commit * enclose classmethods in the class * brought in minor improvements to halos * coverage
* ported changes in halos/profiles * changes from star in halos/ (no tests) * refactor concentration, mass_function, halo_bias; improvements in HMCalculator * HaloProfile subclasses & HaloProfile.normprof attribute * simplify imports * remove HaloProfile.name * cleaned up pk_Npt * add extrap_pk argument * FFTLogParams class instead of dictionary in HaloProfile * simplified code * removed mass_def from HMIngredients; comprehensive code review 1 * re-implementation, bugfixes, tests * c_m_relation >> concentration; code improvements; A_SPLINE_MAX in Python * HMIngredients initializers - no repeated code * rogue file * patch for new changes * updated Build Status badge website * fix websites * added a DOI badge & links * added nonbreaking space * removed extra space * FancyRepr out of CCLObject to simplify * update tests to match changes * coverage * simple test for tkkssc * more tests for tkkssc * addressed comments 1 * addressed comments 2: mass_def defaults are name strings etc. * deprecate Gaussian & PowerLaw profiles * remove all warnings in testing * use pytest as per docs instead of numpy.testing and pyutils.assert_warns * bugfix in master: sometimes mass_def_strict=False fails unexpectedly * typo * addressed comments * New feature: Arbitrary function for profile normalization * gain efficiency * comments + deprecate k_min from HMCalculator * renamed initialize_from_input --> create_instance * brought in CCLNamedClass from docs_v3 * brought in from docs_v3: directly callable HMIngredients * prep for Davids input * renamed HMCalculator --> HaloModel * fix typo * brought in from docs_v3: initialize mass_def from any string (e.g. 400c) * Revert "renamed HMCalculator --> HaloModel" This reverts commit 43591ce. * comments * comments
* __eq_attrs__ for nl_pt
* extricated normprof
* first commit * Einasto mass translator + MassDef concentration API * universal api no-break * comments * MassDef vars
* coverage * comments
Pull Request Test Coverage Report for Build 4927972783
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed with @damonge, I have checked all the non-IA changes and they look good to me.
I'll chime in before this gets merged just to point out that having flags indicating the NC profiles is probably a bad idea. OOP works with inheritance, so it would be best to define an HOD superclass and then use composition, instead of reinstating flags for everything. It also makes no physical sense to define a NC HOD profile, and then be able to change it to non-NC. A profile is, or is not, NC. Also, all module names in Python are lowercase by convention. |
Going through the code now, will post my comments here. To start, I see in the tests that the halo model is now called by |
pyccl/halos/profiles/IA.py
Outdated
|
||
def get_normalization(self, cosmo, a, hmc): | ||
"""Returns the normalization of this profile, which is the | ||
mean galaxy number density. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently testing this normalization but this seems to not be doing the right thing. Also, in the _get_prefactor
method in my PR the normalization is 1/n_gal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it's n_gal (the galaxy number density).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I have run some more tests and this does what it should do, but now the user has to explicitly request the normalization of the profiles (which is the correct thing to do). I also noticed this will be the default option in v3, correct?
@chrgeorgiou yep, indeed. In v3 we introduced a star operator to force users to pass some keyword-only arguments (this is to prevent some functions doing the wrong thing silently only because users passed arguments in the wrong order - we realised there were many instances where this could happen). Your IA profile is the first fully v3 piece of code! |
Ports #922 (by @chrgeorgiou) directly to v3 API