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
Completely decouple Python from all parameters in C #1062
Draft
nikfilippas
wants to merge
135
commits into
master
Choose a base branch
from
codata_v3
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Added new baryons module that will deprecate old BCM
* Tracers in V3
* Background, boltzmann and cls in v3
This is not to be reviewed until all existing capabilities have been ported to v3. There is new science implementations that take priority. |
* tk3d and pk2d in v3 --------- Co-authored-by: Nick Koukoufilippas <nikfilippas@gmail.com>
* 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
* rename core --> Cosmology * renamed core --> cosmology in docs/imports except docstrings * cosmology v2 * first pass * neutrinosneutrinosneutrinos * simplified * yamlyamlyaml * fully fix neutrino mayhem * new arg names in tests * comments * comments on comments on comments * removed tests * no warn --------- Co-authored-by: David Alonso <dam.phys@gmail.com>
* 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 * first commit * alternative way to include linked abstract methods and declare the template methods * reorder * even simpler * enclose classmethods in the class * brought in minor improvements to halos * clone of 1064 * 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 * removed MassConcentration * full implementation (v3 only) * comments * single-liner * coverage
* imports * homogenize all imports as per PEP8 and the Python Import System * homogenize all imports as per PEP8 and the Python Import System * instance checks * all exceptions raised correctly * comments * add aliases * reverted changes and introduced proper enums
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does what it says. With this PR all C-structs that hold parameters are managed from Python - even their values.
I did a slight revamp to the
CCLParameters
class that allows all the parameters that are defined as class attributes to be passed to C on import. And I also fixed some loopholes the previous implementation had.This only contains 5 commits. The commit history looks like this because I merged different bases instead of rebasing.
Note: I had to relax some benchmarks slightly, because of the new CODATA values for the physical constants (mainly
GNEWT
). I verified that CCL's former value gives consistent results with this PR.