Skip to content

Commit 19ff107

Browse files
committed
wrap Series output in Image
(#628)
1 parent 01aa852 commit 19ff107

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

galsim/series.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def getBasisFunc(self, index):
105105

106106
def drawImage(self, *args, **kwargs):
107107
key = (args, tuple(sorted(kwargs.items())))
108-
return np.add.reduce(
109-
[self.cache((key, idx))*c for idx, c in zip(self.indices, self.getCoeffs())])
108+
return galsim.ImageF(np.add.reduce(
109+
[self.cache((key, idx))*c for idx, c in zip(self.indices, self.getCoeffs())]))
110110

111111
def drawKImage(self, *args, **kwargs):
112112
key = (args, tuple(sorted(kwargs.items())))
@@ -165,7 +165,7 @@ def getCoeffs(self):
165165
def getBasisFunc(self, index):
166166
return galsim.Convolve([obj.getBasisFunc(idx) for obj, idx in zip(self.objlist, index[1])])
167167

168-
168+
169169
class Spergelet(galsim.GSObject):
170170
"""A basis function in the Taylor series expansion of the Spergel profile.
171171
@@ -262,7 +262,6 @@ def getCoeffs(self):
262262

263263
def getCoeff(self, j, q):
264264
ellip, phi0, Delta = self._decomposeA()
265-
print "ellip:{} phi0:{} Delta:{}".format(ellip, phi0, Delta)
266265
coeffs = []
267266
coeff = 0.0
268267
for m in range(abs(q), j+1):
@@ -277,7 +276,6 @@ def getCoeff(self, j, q):
277276
num *= ellip**m
278277
den = 2**(m-1) * math.factorial(j-m) * math.factorial(m-n) * math.factorial(n)
279278
coeff += num/den
280-
print "j:{} q:{} m:{} n:{} num:{}, den:{}".format(j, q, m, n, num, den)
281279
if q > 0:
282280
coeff *= self.flux * math.cos(2*q*phi0)
283281
elif q < 0:

0 commit comments

Comments
 (0)