Skip to content

Commit 7d94ad9

Browse files
Merge pull request #32 from GillesOrban/master
corrections on ee50d calculation
2 parents 7e80dd8 + 1738574 commit 7d94ad9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aotools/functions/_functions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def encircledEnergy(data,
8686
8787
"""
8888
dim = data.shape[0] // 2
89-
center = [dim, dim]
89+
if center is None:
90+
center = [dim, dim]
9091
xc = center[0]
9192
yc = center[1]
9293
e = 1.9
@@ -97,16 +98,15 @@ def encircledEnergy(data,
9798
for i in range(npt):
9899
pup = pupil.circle(rad[i],
99100
int(dim) * 2,
100-
circle_centre=(xc + 0.5,
101-
yc + 0.5),
101+
circle_centre=(xc, yc),
102102
origin='corner')
103103
rad[i] = numpy.sqrt(numpy.sum(pup) * 4 / numpy.pi) # diameter
104104
ee[i] = numpy.sum(pup * data)
105105

106106
rad = numpy.append(0, rad)
107107
ee = numpy.append(0, ee)
108108
ee /= numpy.sum(data)
109-
xi = numpy.linspace(0, dim, int(2 * dim))
109+
xi = numpy.linspace(0, dim, int(4 * dim))
110110
yi = numpy.interp(xi, rad, ee)
111111

112112
if eeDiameter is False:

0 commit comments

Comments
 (0)