Commit 1c4fc7f7 authored by Daniel Toyra's avatar Daniel Toyra
Browse files

Fixed some Python2 --> Python3 related issues: range is a list in 2, while a range in 3.

parent 4587b4b6
......@@ -594,7 +594,10 @@ class surfacemap(object):
nVals = range(0,n+1)
for k in nVals:
mVals.append(range(-k,k+1,2))
elif isinstance(m,list):
elif isinstance(m, list):
nVals = range(n,n+1)
mVals.append(m)
elif isinstance(m, range):
nVals = range(n,n+1)
mVals.append(m)
elif isinstance(m,int):
......@@ -1368,7 +1371,12 @@ class surfacemap(object):
rho, phi= self.createPolarGrid()
rho = rho/R
if isinstance(m,list):
if isinstance(m, list):
for k in range(len(m)):
Z = zernike(m[k], n, rho, phi)
self.data[self.notNan] = self.data[self.notNan]-A[k]*Z[self.notNan]
self.zernikeRemoved = (m[k], n, A[k])
elif isinstance(m, range):
for k in range(len(m)):
Z = zernike(m[k], n, rho, phi)
self.data[self.notNan] = self.data[self.notNan]-A[k]*Z[self.notNan]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment