From 94cd0f16d49739e136fa0f837248ec8c4ff4acd9 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Fri, 14 Nov 2025 09:28:05 -0800 Subject: [PATCH 1/3] Remove normalization for MT --- simpeg_drivers/components/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simpeg_drivers/components/data.py b/simpeg_drivers/components/data.py index a9f2825c..3d25092f 100644 --- a/simpeg_drivers/components/data.py +++ b/simpeg_drivers/components/data.py @@ -300,7 +300,7 @@ def get_normalizations(self): if comp in ["gz", "bz", "gxz", "gyz", "bxz", "byz"]: normalizations[chan][comp] = -1 * np.ones(self.mask.sum()) elif self.params.inversion_type in ["magnetotellurics"]: - normalizations[chan][comp] = -1 * np.ones(self.mask.sum()) + normalizations[chan][comp] = np.ones(self.mask.sum()) elif self.params.inversion_type in ["tipper"]: if "imag" in comp: normalizations[chan][comp] = -1 * np.ones(self.mask.sum()) From 2c4964b796027a811bef0b944ed2a1c07fe5eda7 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Fri, 14 Nov 2025 09:30:43 -0800 Subject: [PATCH 2/3] Update target --- tests/run_tests/driver_mt_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/run_tests/driver_mt_test.py b/tests/run_tests/driver_mt_test.py index 9bcc4a00..8f0e10f5 100644 --- a/tests/run_tests/driver_mt_test.py +++ b/tests/run_tests/driver_mt_test.py @@ -41,7 +41,7 @@ # To test the full run and validate the inversion. # Move this file out of the test directory and run. -target_run = {"data_norm": 0.032649770, "phi_d": 6.68, "phi_m": 263} +target_run = {"data_norm": 0.032649770, "phi_d": 7.13, "phi_m": 282} def setup_data(workspace, survey): @@ -186,7 +186,7 @@ def test_magnetotellurics_run(tmp_path: Path, max_iterations=1, pytest=True): ) output["data"] = orig_zyy_real_1 if pytest: - check_target(output, target_run, tolerance=0.2) + check_target(output, target_run) nan_ind = np.isnan(run_ws.get_entity("Iteration_0_model")[0].values) inactive_ind = run_ws.get_entity("active_cells")[0].values == 0 assert np.all(nan_ind == inactive_ind) From 9bc0305b1e7abfc92b51e921112ae871ff8c4292 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Mon, 17 Nov 2025 12:24:23 -0800 Subject: [PATCH 3/3] Increase tolerance for MT --- tests/run_tests/driver_mt_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run_tests/driver_mt_test.py b/tests/run_tests/driver_mt_test.py index 8f0e10f5..7d2e3873 100644 --- a/tests/run_tests/driver_mt_test.py +++ b/tests/run_tests/driver_mt_test.py @@ -186,7 +186,7 @@ def test_magnetotellurics_run(tmp_path: Path, max_iterations=1, pytest=True): ) output["data"] = orig_zyy_real_1 if pytest: - check_target(output, target_run) + check_target(output, target_run, tolerance=0.1) nan_ind = np.isnan(run_ws.get_entity("Iteration_0_model")[0].values) inactive_ind = run_ws.get_entity("active_cells")[0].values == 0 assert np.all(nan_ind == inactive_ind)