-
Notifications
You must be signed in to change notification settings - Fork 32
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
Divide by zero error in project_2d module #62
Comments
Hi Alex - sorry to just get to this. Can you send me something to reproduce it? |
Hi Joe, sorry it's taken so long for me to get back to this - I've been been doing other things with Cosmosis that didn't get this error, but I'm back to getting this warning again so hence digging out this thread! I've put together a minimum working example of this error. It's a simple Cosmosis script that generates a Gaussian n(z) with a custom centre, then calls CAMB for the P(k, z), and then pk_to_cl uses both of these (with a trivial likelihood). In the I've also noted that it only appears occasionally, as it seems quite sensitive to the current cosmological parameters that the sampler is processing (hence the seemingly random value of h0). Hope this example works for you, anything else I can help with just let me know. Thanks! |
Hi Alex, This doesn't reproduce the warning you mentioned for me. Using the latest version of the cosmosis-standard-library on my laptop it seems to run fine. I've tried randomly varying H0 with the apriori sampler to generate hundreds of different values, but with no change. What standard library version are you using? It might be something we've fixed (even accidentally!) in project_2d or camb. Can you try setting Cheers |
Hi Joe, I've just downloaded and installed the latest version of the cosmosis-standard-library and still getting the same warning. It seems like a very odd error, but I think it stems from the The good news is that it doesn't seem to affect the Cl values that it outputs, as it's just slightly changing the very first value for the lensing kernel. Thanks, EDIT: I've been playing around with your Demo 6 of the CFHTLens likelihood, where I've changed it to draw H0 samples at random and managed to get the divide by zero warning to trigger there - so it's not just my code! I'm surprised that this hasn't been raised before? |
Hi Joe,
I've been using the
project_2d
module to turn my matter power spectrum P(k) into lensing C_l values and it's generally been working fine, however I've been experiencing some weird errors when I change the distribution of galaxies in redshift bins.To generate the n(z), I've been using a Gaussian centred at z=1 with some small width, as follows:
This works fine. However, when I change the Gaussian to be centred at less than z=1, then suddenly the
project_2d
module starts spitting out this error:I'm not really sure what's causing this as I say it's working for higher redshift bins so odd (in my opinion) that it would break when I move to lower redshifts. It also seems to throw off the sampling as I start getting values of Omega_m & sigma_8 from my pipeline that are way off from what they should be (whereas for the z>=1 bins it works fine).
Have you got any ideas what would be causing this strange behaviour?
I can put together a minimum working example if that would help.
Thanks! :)
The text was updated successfully, but these errors were encountered: