Allow Separable Growth Functions to compute Isotropized Power Spectra#1216
Allow Separable Growth Functions to compute Isotropized Power Spectra#1216
Conversation
Pull Request Test Coverage Report for Build 12161562031Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
pyccl/halos/pk_4pt.py
Outdated
| p_of_k_a (:class:`~pyccl.pk2d.Pk2D`): a `Pk2D` object to | ||
| be used as the linear matter power spectrum. If `None`, the power | ||
| spectrum stored within `cosmo` will be used. | ||
| separable_growth (Boolean): Indeicates whether a separable |
There was a problem hiding this comment.
Typo: Indeicates -> Indicates and in all following occurrences.
There was a problem hiding this comment.
and Boolean -> bool for consistency (and so the docs look nice)
pyccl/halos/pk_4pt.py
Outdated
| p_of_k_a (:class:`~pyccl.pk2d.Pk2D`): a `Pk2D` object to | ||
| be used as the linear matter power spectrum. If `None`, the power | ||
| spectrum stored within `cosmo` will be used. | ||
| separable_growth (Boolean): Indeicates whether a separable |
There was a problem hiding this comment.
Typo: Indeicates -> Indicates
damonge
left a comment
There was a problem hiding this comment.
Looks great @paulrogozenski ! Just a few typos (thanks @rreischke )
| zero values are found). | ||
| separable_growth (Boolean): Indeicates whether a separable | ||
| growth function approximation can be used to calculate | ||
| the isotropized power spectrum. |
There was a problem hiding this comment.
Indeicates -> Indicates
Boolean -> bool
| zero values are found). | ||
| separable_growth (Boolean): Indeicates whether a separable | ||
| growth function approximation can be used to calculate | ||
| the isotropized power spectrum. |
| zero values are found). | ||
| separable_growth (Boolean): Indeicates whether a separable | ||
| growth function approximation can be used to calculate | ||
| the isotropized power spectrum. |
pyccl/halos/pk_4pt.py
Outdated
| p_of_k_a (:class:`~pyccl.pk2d.Pk2D`): a `Pk2D` object to | ||
| be used as the linear matter power spectrum. If `None`, the power | ||
| spectrum stored within `cosmo` will be used. | ||
| separable_growth (Boolean): Indeicates whether a separable |
There was a problem hiding this comment.
and Boolean -> bool for consistency (and so the docs look nice)
pyccl/halos/pk_4pt.py
Outdated
| p_of_k_a (:class:`~pyccl.pk2d.Pk2D`): a `Pk2D` object to | ||
| be used as the linear matter power spectrum. If `None`, the power | ||
| spectrum stored within `cosmo` will be used. | ||
| separable_growth (Boolean): Indeicates whether a separable |
pyccl/halos/pk_4pt.py
Outdated
| p_of_k_a (:class:`~pyccl.pk2d.Pk2D`): a `Pk2D` object to | ||
| be used as the linear matter power spectrum. If `None`, the power | ||
| spectrum stored within `cosmo` will be used. | ||
| separable_growth (Boolean): Indeicates whether a separable |
| zero values are found). | ||
| separable_growth (Boolean): Indeicates whether a separable | ||
| growth function approximation can be used to calculate | ||
| the isotropized power spectrum. |
|
Also, we need to add a unit test for this. Checking that you get the same result for some of this functions with or without scaling would be enough. |
rreischke
left a comment
There was a problem hiding this comment.
Looks great, thanks Paul!
A large bottleneck in the computation time of covariances is the calculation of isotropized power spectra. The current implementation calculates this at each scale factor considered in the computation. By separating the growth factor from this computation, one can save computation time and maintain accuracy to a good approximation.
The implementation includes optional flags when calculating the 2h_22, 3h, and 4h Trispectrum terms in
pk_4pt.pyand the corresponding functions for wrappers.