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

Fix the CMB lensing kernel to handle models with non-zero curvature. #1231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vitenti
Copy link
Contributor

@vitenti vitenti commented Mar 5, 2025

No description provided.

@@ -559,7 +559,10 @@ void ccl_get_kappa_kernel(ccl_cosmology *cosmo, double chi_source,
for (int ichi=0; ichi < nchi; ichi++) {
double chi = chi_arr[ichi];
double a = ccl_scale_factor_of_chi(cosmo, chi, status);
wchi[ichi] = lens_prefac*(ccl_sinn(cosmo,chi_source-chi,status))*chi/a;
if (chi != 0.0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@damonge This "if" is necessary to avoid 0/0 when chi == 0. If it is safe to assume that the chi_arr only contain 0.0 in its first element this can be simplified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant