Skip to content

Commit

Permalink
test: clean up test_optics
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr authored Aug 22, 2024
1 parent 9cd8ab2 commit aae4649
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_optics.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,11 @@ def test_OpticalPSF_pupil_plane_size():
im = galsim.Image(512, 512)
x = y = np.arange(512) - 256
y, x = np.meshgrid(y, x)
if hasattr(galsim, "_galsim"):
im.array[x**2+y**2 < 230**2] = 1.0
else:
if is_jax_galsim():
# no refs in jax-galsim
im._array = im.array.at[x**2+y**2 < 230**2].set(1.0)
else:
im.array[x**2+y**2 < 230**2] = 1.0
# The following still fails (uses deprecated optics framework):
# galsim.optics.OpticalPSF(aberrations=[0,0,0,0,0.5], diam=4.0, lam=700.0, pupil_plane_im=im)
# But using the new framework, should work.
Expand Down

0 comments on commit aae4649

Please sign in to comment.