Skip to content

Commit

Permalink
Merge pull request #32 from GillesOrban/master
Browse files Browse the repository at this point in the history
corrections on ee50d calculation
  • Loading branch information
matthewtownson committed Oct 30, 2017
2 parents 7e80dd8 + 1738574 commit 7d94ad9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aotools/functions/_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def encircledEnergy(data,
"""
dim = data.shape[0] // 2
center = [dim, dim]
if center is None:
center = [dim, dim]
xc = center[0]
yc = center[1]
e = 1.9
Expand All @@ -97,16 +98,15 @@ def encircledEnergy(data,
for i in range(npt):
pup = pupil.circle(rad[i],
int(dim) * 2,
circle_centre=(xc + 0.5,
yc + 0.5),
circle_centre=(xc, yc),
origin='corner')
rad[i] = numpy.sqrt(numpy.sum(pup) * 4 / numpy.pi) # diameter
ee[i] = numpy.sum(pup * data)

rad = numpy.append(0, rad)
ee = numpy.append(0, ee)
ee /= numpy.sum(data)
xi = numpy.linspace(0, dim, int(2 * dim))
xi = numpy.linspace(0, dim, int(4 * dim))
yi = numpy.interp(xi, rad, ee)

if eeDiameter is False:
Expand Down

0 comments on commit 7d94ad9

Please sign in to comment.