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

053118 minor update #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dwhan89
Copy link
Collaborator

@dwhan89 dwhan89 commented May 31, 2018

fillWithGaussianRandomField() fails sometimes because scipy spline interpolation routines (splrep,splev) can return superfluous negative values (it's not clear why this is the case.) I swapped them with scipy interp1d which seem to be more stable.

@ajvanengelen
Copy link
Collaborator

Could we merge this in? I have been doing hack workarounds for this since forever.

@msyriac
Copy link
Member

msyriac commented Sep 14, 2018

These are two different kind of interpolations. I almost exclusively use interp1d with linear interpolation when dealing with Cls, but I wonder if there was a reason why spline was used in flipper. Maybe @blakesherwin or @amaurea can also comment before we merge?

@ajvanengelen
Copy link
Collaborator

ajvanengelen commented Sep 14, 2018 via email

@msyriac
Copy link
Member

msyriac commented Sep 14, 2018

Yep, I understand the problem and have encountered it myself too. (I think I used to do something like set all negative power values to zero, which isn't a great solution.) I just wanted to raise the question of why spline interpolation specifically at cubic order was used to begin with. And should perhaps the order of interpolation in interp1d be higher?

In some sense, for flat-sky testing, if sims are generated with order X interpolation and compared to theory with order X interpolation, you'll never see a difference. I'm not sure there is a good test for what interpolation is "correct" since this is intimately tied to wrongness of flat-sky Cls.

@ajvanengelen
Copy link
Collaborator

ajvanengelen commented Sep 14, 2018 via email

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.

3 participants