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

zernike.arbitrary_basis still sometimes clips the edges of apertures #240

Closed
kvangorkom opened this issue Nov 14, 2017 · 1 comment
Closed

Comments

@kvangorkom
Copy link
Contributor

I ran across this when looking at the basis calculated for a square aperture:

basis_clipped

This appears to be the result of using the wrong formula for the center of the array when calculating the padding for the aperture. The expression

padding = ( int(ceil((max_extent - shape[0] / 2.))), int(ceil((max_extent - shape[1] / 2.))) )

should be

padding = ( int(ceil((max_extent - (shape[0] - 1) / 2.))), int(ceil((max_extent - (shape[1] - 1) / 2.))) )

@mperrin pointed this error out when I submitted this code originally, and I thought I'd fixed this everywhere, but I apparently overlooked this one.

Opening a PR with the fix!

@kvangorkom
Copy link
Contributor Author

Fixed in #241.

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

No branches or pull requests

1 participant