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

Wrong calculation of self.center_y, self.center_x for Convolvable class #2

Closed
ira7bar opened this issue Feb 12, 2019 · 1 comment
Closed

Comments

@ira7bar
Copy link

ira7bar commented Feb 12, 2019

Current calculation of center_x and center_y of Convolvable class is:
self.center_y, self.center_x = int(m.ceil(self.samples_y / 2)), int(m.ceil(self.samples_x / 2))
This gives the wrong values for odd dimensions (e.g. 10 -> 6 instead of 5) as these values are used as indices later, for example in plot_slice_xy().
In other classes (e.g. MTF), this is calculated as:
self.center_x = self.samples_x // 2
self.center_y = self.samples_y // 2
Which gives the expected results.

I'm using prysm version 0.14.0 with python 3.6.7 (installed via pip).

Thank you.

@brandondube
Copy link
Owner

brandondube commented Feb 12, 2019

Thanks for the catch. I haven't touched the MTF of PSF (Convolvable) classes in quite a long time -- I think more than a year. The Convolvable one is correct in base 1 indexes, which is probably why I did that :)

Anyway. Resolved in 574ac53. If you need this today you can install from git/master, which will put you on 0.15 dev. The other changes in the release thus far are all to do with interferograms or better packaging/distribution, and 0.15 is due in probably mid-march.

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

2 participants