- changed status to resolved
Python 2/3 divide issue
Issue #22
resolved
I found this in BKA but I think extractSpec and FMMF also have copied this line of code:
x_psf_grid, y_psf_grid = np.meshgrid(np.arange(nx_psf * 1.)-nx_psf/2,np.arange(ny_psf* 1.)-ny_psf/2)
which would be off by half a pixel in python 3, since in python 3, this isn't integer divide. So instead we should cast it with //
:
x_psf_grid, y_psf_grid = np.meshgrid(np.arange(nx_psf * 1.) - nx_psf//2, np.arange(ny_psf * 1.) - ny_psf//2)
Comments (1)
-
reporter - Log in to comment
This was fixed in f5d0749 for extractSpec. And it's already fixed in FMMF.