Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aotools/functions/zernike.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def zernikeRadialFunc(n, m, r):
R += numpy.array(r**(n - 2 * i) * (((-1)**(i)) *
math.factorial(n - i)) /
(math.factorial(i) *

math.factorial((n + m)//2 - i) *
math.factorial((n - m)//2 - i)),
dtype='float')
Expand Down
16 changes: 7 additions & 9 deletions aotools/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,20 @@ def zoom(array, newSize, order=3):
#If array is complex must do 2 interpolations
if array.dtype==numpy.complex64 or array.dtype==numpy.complex128:

realInterpObj = interp2d( numpy.arange(array.shape[0]),
numpy.arange(array.shape[1]), array.real, copy=False,
kind=INTERP_KIND[order])
imagInterpObj = interp2d( numpy.arange(array.shape[0]),
numpy.arange(array.shape[1]), array.imag, copy=False,
kind=INTERP_KIND[order])
realInterpObj = RectBivariateSpline( numpy.arange(array.shape[0]),
numpy.arange(array.shape[1]), array.real, kx=order, ky=order)
imagInterpObj = RectBivariateSpline( numpy.arange(array.shape[0]),
numpy.arange(array.shape[1]), array.imag,
kx=order, ky=order)
return (realInterpObj(coordsY,coordsX)
+ 1j*imagInterpObj(coordsY,coordsX))



else:

interpObj = interp2d( numpy.arange(array.shape[0]),
numpy.arange(array.shape[1]), array, copy=False,
kind=INTERP_KIND[order])
interpObj = RectBivariateSpline( numpy.arange(array.shape[0]),
numpy.arange(array.shape[1]), array, kx=order, ky=order)

#return numpy.flipud(numpy.rot90(interpObj(coordsY,coordsX)))
return interpObj(coordsY,coordsX)
Expand Down
Loading