Resample: simplify code

This commit is contained in:
DeepSOIC 2015-11-18 02:50:11 +03:00
parent dda1d5c3d2
commit 91f2331106
2 changed files with 1 additions and 10 deletions

View File

@ -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'''

View File

@ -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