Skip to content

Commit

Permalink
Add test for FQPM
Browse files Browse the repository at this point in the history
  • Loading branch information
ivalaginja committed Nov 7, 2023
1 parent 72c1cb8 commit ba2e483
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_coronagraphy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,31 @@ def test_vortex_coronagraph():
assert img.total_power < 1e-6
assert img.intensity.max() / img_ref.intensity.max() < 1e-8

def test_fqpm_coronagraph():
pupil_grid = make_pupil_grid(256)
focal_grid = make_focal_grid(4, 32)
prop = FraunhoferPropagator(pupil_grid, focal_grid)

aperture = make_circular_aperture(1)
aperture = evaluate_supersampled(aperture, pupil_grid, 8)

lyot = make_circular_aperture(0.99)
lyot = evaluate_supersampled(lyot, pupil_grid, 8) > 1 - 1e-5

fqpm = FQPMCoronagraph(pupil_grid)

wf = Wavefront(aperture)
wf.total_power = 1

img_ref = prop(wf)

wf = fqpm(wf)
wf.electric_field *= lyot
img = prop(wf)

assert img.total_power < 1e-6
assert img.intensity.max() / img_ref.intensity.max() < 4e-8

def test_vector_vortex_coronagraph():
pupil_grid = make_pupil_grid(256)
focal_grid = make_focal_grid(4, 32)
Expand Down

0 comments on commit ba2e483

Please sign in to comment.