Skip to content

053118 minor update#16

Open
dwhan89 wants to merge 3 commits intoACTCollaboration:masterfrom
dwhan89:053118_minor_update
Open

053118 minor update#16
dwhan89 wants to merge 3 commits intoACTCollaboration:masterfrom
dwhan89:053118_minor_update

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