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 indexing errors #9

Merged
merged 8 commits into from
Mar 20, 2020
Merged

Fix indexing errors #9

merged 8 commits into from
Mar 20, 2020

Conversation

austinpeel
Copy link
Collaborator

No description provided.

@aymgal aymgal linked an issue Mar 19, 2020 that may be closed by this pull request
@aymgal
Copy link
Owner

aymgal commented Mar 20, 2020

I notice that the build is failing because of the spectral norm test. I don't know if this is only a numerical issue, but the difference with the previous value is quite significant. Just to be sure, did you check that your fixed version gives the same result than before, on simple test cases (excluding extreme lens models) ?

@aymgal
Copy link
Owner

aymgal commented Mar 20, 2020

Awesome, thanks! I gave you access to merge, so when you're done with this PR please merge it ;)

@austinpeel
Copy link
Collaborator Author

Will do!
So yeah, what was happening was that in the case of source pixels on the border whose neighbors were out of bounds, the weights were being calculated as if those neighbors were still included. So when those neighbors were excluded at the end, the sum of the actual weights was < 1 in those cases. To fix it, I just scaled up those weights to properly sum to 1, and this in turn fixed the spectral norm issue.

@austinpeel austinpeel merged commit 0ac0613 into aymgal:master Mar 20, 2020
aymgal pushed a commit that referenced this pull request Apr 9, 2020
Treat axis inversions in the lensing operator
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.

Index out of bounds in lensing operator
2 participants