Skip to content

Commit 7d4744b

Browse files
committed
Update targets and squeeze tolerance
1 parent 4fcfc63 commit 7d4744b

15 files changed

Lines changed: 20 additions & 21 deletions

simpeg_drivers/utils/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def make(self):
7878
return self.ws
7979

8080

81-
def check_target(output: dict, target: dict, tolerance=0.1):
81+
def check_target(output: dict, target: dict, tolerance=0.05):
8282
"""
8383
Check inversion output metrics against hard-valued target.
8484
:param output: Dictionary containing keys for 'data', 'phi_d' and 'phi_m'.

tests/run_tests/driver_airborne_tem_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
# To test the full run and validate the inversion.
3434
# Move this file out of the test directory and run.
35-
target_run = {"data_norm": 7.05481e-08, "phi_d": 198200000, "phi_m": 7806}
35+
target_run = {"data_norm": 7.05481e-08, "phi_d": 198000000, "phi_m": 7540}
3636

3737

3838
def test_bad_waveform(tmp_path: Path):
@@ -199,7 +199,7 @@ def test_airborne_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
199199
)
200200
output["data"] = orig_dBzdt
201201
if pytest:
202-
check_target(output, target_run, tolerance=0.1)
202+
check_target(output, target_run)
203203
nan_ind = np.isnan(run_ws.get_entity("Iteration_0_model")[0].values)
204204
inactive_ind = run_ws.get_entity("active_cells")[0].values == 0
205205
assert np.all(nan_ind == inactive_ind)

tests/run_tests/driver_dc_2d_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636

3737
target_run = {
3838
"data_norm": 0.59563,
39-
"phi_d": 2814,
40-
"phi_m": 15.88,
39+
"phi_d": 2820,
40+
"phi_m": 16.8,
4141
}
4242

4343

tests/run_tests/driver_dc_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# To test the full run and validate the inversion.
3232
# Move this file out of the test directory and run.
3333

34-
target_run = {"data_norm": 0.150326, "phi_d": 194.2, "phi_m": 346.2}
34+
target_run = {"data_norm": 0.150326, "phi_d": 212, "phi_m": 374}
3535

3636

3737
def test_dc_3d_fwr_run(

tests/run_tests/driver_fem_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_fem_run(tmp_path: Path, max_iterations=1, pytest=True):
165165
)
166166

167167
if pytest:
168-
check_target(output, target_run, tolerance=0.1)
168+
check_target(output, target_run)
169169
nan_ind = np.isnan(run_ws.get_entity("Iteration_0_model")[0].values)
170170
inactive_ind = run_ws.get_entity("active_cells")[0].values == 0
171171
assert np.all(nan_ind == inactive_ind)

tests/run_tests/driver_ground_tem_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# To test the full run and validate the inversion.
3737
# Move this file out of the test directory and run.
3838

39-
target_run = {"data_norm": 8.806897e-07, "phi_d": 152.8, "phi_m": 12850}
39+
target_run = {"data_norm": 8.806897e-07, "phi_d": 153, "phi_m": 13100}
4040

4141

4242
def test_tiling_ground_tem(
@@ -230,7 +230,7 @@ def test_ground_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
230230
assert driver.inversion_data.entity.tx_id_property.name == "tx_id"
231231
output["data"] = orig_dBzdt
232232
if pytest:
233-
check_target(output, target_run, tolerance=0.1)
233+
check_target(output, target_run)
234234
nan_ind = np.isnan(run_ws.get_entity("Iteration_0_model")[0].values)
235235
inactive_ind = run_ws.get_entity("active_cells")[0].values == 0
236236
assert np.all(nan_ind == inactive_ind)

tests/run_tests/driver_ip_2d_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# To test the full run and validate the inversion.
3333
# Move this file out of the test directory and run.
3434

35-
target_run = {"data_norm": 0.09052544, "phi_d": 24910, "phi_m": 0.1845}
35+
target_run = {"data_norm": 0.09052544, "phi_d": 24900, "phi_m": 0.185}
3636

3737

3838
def test_ip_2d_fwr_run(

tests/run_tests/driver_ip_b2d_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# To test the full run and validate the inversion.
3838
# Move this file out of the test directory and run.
3939

40-
target_run = {"data_norm": 0.0919313, "phi_d": 25480, "phi_m": 0.2008}
40+
target_run = {"data_norm": 0.0919313, "phi_d": 25600, "phi_m": 0.201}
4141

4242

4343
def test_ip_p3d_fwr_run(

tests/run_tests/driver_ip_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# To test the full run and validate the inversion.
3131
# Move this file out of the test directory and run.
3232

33-
target_run = {"data_norm": 0.0082997, "phi_d": 180.9, "phi_m": 0.6749}
33+
target_run = {"data_norm": 0.0082997, "phi_d": 178, "phi_m": 0.684}
3434

3535

3636
def test_ip_3d_fwr_run(

tests/run_tests/driver_joint_cross_gradient_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
# To test the full run and validate the inversion.
4848
# Move this file out of the test directory and run.
4949

50-
target_run = {"data_norm": 53.29601, "phi_d": 10590, "phi_m": 0.1336}
50+
target_run = {"data_norm": 53.29601, "phi_d": 10200, "phi_m": 0.123}
5151

5252

5353
def test_joint_cross_gradient_fwr_run(

0 commit comments

Comments
 (0)