Skip to content

Commit

Permalink
fix phi_ when default is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
scottprahl committed Oct 24, 2023
1 parent 27cf5e5 commit bdbed1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions laserbeamsize/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def beam_size(image,

for _iteration in range(1, max_iter):

phi_ = phi or phi_
phi_ = phi if phi is not None else phi_

# save current beam properties for later comparison
xc2, yc2, dx2, dy2 = xc, yc, dx, dy
Expand All @@ -220,8 +220,7 @@ def beam_size(image,
if abs(xc - xc2) < 1 and abs(yc - yc2) < 1 and abs(dx - dx2) < 1 and abs(dy - dy2) < 1:
break

phi_ = phi or phi_

phi_ = phi if phi is not None else phi_
return xc, yc, dx, dy, phi_


Expand Down

0 comments on commit bdbed1f

Please sign in to comment.