Skip to content

Commit

Permalink
add tests for progressbar
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrin committed Mar 7, 2024
1 parent 0dd0a85 commit ef7f9e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions poppy/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ def test_multiwavelength_opticalsystem():
assert np.allclose(psf[0].data, output), \
"Multi-wavelength PSF does not match weighted sum of individual wavelength PSFs"

# test that it's also possible to display a progress bar for multi wave calculations
psf = osys.calc_psf(wavelength=wavelengths, weight=weights, progressbar=True)

return psf


Expand Down
2 changes: 1 addition & 1 deletion poppy/tests/test_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_instrument_calc_datacube():

inst = instrument.Instrument()
psf = inst.calc_datacube(WAVELENGTHS_ARRAY, fov_pixels=FOV_PIXELS,
detector_oversample=2, fft_oversample=2)
detector_oversample=2, fft_oversample=2, progressbar=True)
assert psf[0].header['NWAVES'] == len(WAVELENGTHS_ARRAY), \
"Number of wavelengths in PSF header does not match number requested"
assert len(psf[0].data.shape) == 3, "Incorrect dimensions for output cube"
Expand Down

0 comments on commit ef7f9e9

Please sign in to comment.