Resample: simplify code
This commit is contained in:
parent
dda1d5c3d2
commit
91f2331106
|
@ -9,7 +9,7 @@ class InterpolateF:
|
|||
self.XPoints = XPoints
|
||||
self.YPoints = YPoints
|
||||
if XPoints is not None:
|
||||
self.recompute
|
||||
self.recompute()
|
||||
|
||||
def recompute(self):
|
||||
'''call before using value(), if changing sample values via attributes'''
|
||||
|
|
|
@ -107,24 +107,15 @@ class LatticeResample(latticeBaseFeature.LatticeFeature):
|
|||
prevQ = Q
|
||||
|
||||
# constuct function objects
|
||||
interpolations = [] #container to receive all active interpolation function objects
|
||||
if posIsInterpolate:
|
||||
FX = LIU.InterpolateF(IArray,XArray)
|
||||
interpolations.append(FX)
|
||||
FY = LIU.InterpolateF(IArray,YArray)
|
||||
interpolations.append(FY)
|
||||
FZ = LIU.InterpolateF(IArray,ZArray)
|
||||
interpolations.append(FZ)
|
||||
if oriIsInterpolate:
|
||||
FQs = []
|
||||
for iQ in [0,1,2,3]:
|
||||
FQs.append(LIU.InterpolateF(IArray,QArrays[iQ]))
|
||||
interpolations.extend(FQs)
|
||||
|
||||
# recompute function objects
|
||||
for F in interpolations:
|
||||
F.recompute()
|
||||
|
||||
# initialize output containers and loop variables
|
||||
outputPlms = [] #list of placements
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user