diff --git a/test/accelerate_tests/base_tests/WASP_tests.py b/test/accelerate_tests/base_tests/WASP_test.py similarity index 100% rename from test/accelerate_tests/base_tests/WASP_tests.py rename to test/accelerate_tests/base_tests/WASP_test.py diff --git a/test/accelerate_tests/base_tests/engine_tests.py b/test/accelerate_tests/base_tests/engine_test.py similarity index 87% rename from test/accelerate_tests/base_tests/engine_tests.py rename to test/accelerate_tests/base_tests/engine_test.py index dbfc1e9f6..1686947ad 100644 --- a/test/accelerate_tests/base_tests/engine_tests.py +++ b/test/accelerate_tests/base_tests/engine_test.py @@ -68,13 +68,13 @@ def check_engine_output(self, output, plotting=False, debug=False): RMSE_ob = (np.mean(np.abs(OBJ_ML_serial - OBJ_ML)**2)) RMSE_pr = (np.mean(np.abs(PRB_ML_serial - PRB_ML)**2)) # RMSE_LL = (np.mean(np.abs(LL_ML_serial - LL_ML)**2)) - np.testing.assert_allclose(RMSE_ob, 0.0, atol=1e-2, + np.testing.assert_allclose(RMSE_ob, 0.0, atol=1e-2, err_msg="The object arrays are not matching as expected") - np.testing.assert_allclose(RMSE_pr, 0.0, atol=1e-2, + np.testing.assert_allclose(RMSE_pr, 0.0, atol=1e-2, err_msg="The object arrays are not matching as expected") # np.testing.assert_allclose(RMSE_LL, 0.0, atol=1e-7, # err_msg="The log-likelihood errors are not matching as expected") - + def test_ML_serial_base(self): out = [] @@ -150,6 +150,25 @@ def test_ML_serial_smoothing_regularizer(self): scanmodel="BlockFull", autosave=False, verbose_level="critical")) self.check_engine_output(out, plotting=False, debug=False) + def test_ML_serial_wavefield_preconditioner(self): + out = [] + for eng in ["ML", "ML_serial"]: + engine_params = u.Param() + engine_params.name = eng + engine_params.numiter = 100 + engine_params.floating_intensities = False + engine_params.reg_del2 = False + engine_params.reg_del2_amplitude = 1. + engine_params.smooth_gradient = 0. + engine_params.smooth_gradient_decay = 0. + engine_params.scale_precond = False + engine_params.wavefield_precond = True + engine_params.wavefield_delta_object = 0.1 + engine_params.wavefield_delta_probe = 0.1 + out.append(tu.EngineTestRunner(engine_params, output_path=self.outpath, init_correct_probe=True, + scanmodel="BlockFull", autosave=False, verbose_level="critical")) + self.check_engine_output(out, plotting=False, debug=False) + def test_ML_serial_all(self): out = [] for eng in ["ML", "ML_serial"]: diff --git a/test/accelerate_tests/cuda_cupy_tests/WASP_tests.py b/test/accelerate_tests/cuda_cupy_tests/WASP_test.py similarity index 100% rename from test/accelerate_tests/cuda_cupy_tests/WASP_tests.py rename to test/accelerate_tests/cuda_cupy_tests/WASP_test.py diff --git a/test/accelerate_tests/cuda_pycuda_tests/WASP_tests.py b/test/accelerate_tests/cuda_pycuda_tests/WASP_test.py similarity index 100% rename from test/accelerate_tests/cuda_pycuda_tests/WASP_tests.py rename to test/accelerate_tests/cuda_pycuda_tests/WASP_test.py