Skip to content

Commit

Permalink
segmented: bugfix for missing tophats on keystone apertures
Browse files Browse the repository at this point in the history
  • Loading branch information
brandondube committed Oct 11, 2023
1 parent c06afa9 commit aa7021e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prysm/segmented.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ def _composite_keystone_aperture(center_circle_diameter, segment_gap, x, y,

for angle in segment_angles:
# find the four corners; c = corner
# because keystones are Problematic (TM), the "upper" vertex
# may be outside the usual corners
lo = angle
hi = angle+arc_rad
while hi > 2*np.pi:
Expand All @@ -712,11 +714,13 @@ def _composite_keystone_aperture(center_circle_diameter, segment_gap, x, y,
mid = lo + arc_rad / 2
center_angles.append(mid)

# egg: a pie has five corners
c1 = (inner_radius, lo)
c2 = (inner_radius, hi)
c3 = (outer_radius, lo)
c4 = (outer_radius, hi)
arr = np.array([c1, c2, c3, c4])
c5 = (outer_radius, mid)
arr = np.array([c1, c2, c3, c4, c5])
rr = arr[:, 0]
tt = arr[:, 1]
xx, yy = polar_to_cart(rr, tt)
Expand Down

0 comments on commit aa7021e

Please sign in to comment.