Skip to content

Commit 40512aa

Browse files
committed
Update tem uijson. Update tests
1 parent 92416f5 commit 40512aa

6 files changed

Lines changed: 28 additions & 22 deletions

File tree

simpeg_drivers-assets/uijson/tdem_forward.ui.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@
5858
],
5959
"value": "dB/dt (T/s)"
6060
},
61-
"z_channel_bool": {
61+
"vertical_channel_bool": {
6262
"group": "Survey",
6363
"main": true,
6464
"label": "Vertical",
6565
"tooltip": "Vertical (w) component of the magnetic data.\nPositive up along the z-axis if no receiver orientation provided",
6666
"value": true
6767
},
68-
"y_channel_bool": {
68+
"inline_channel_bool": {
6969
"group": "Survey",
7070
"main": true,
7171
"label": "In-line",
7272
"tooltip": "In-line (u) component of the magnetic data.\nPositive towards North if no receiver orientation provided",
7373
"value": true
7474
},
75-
"x_channel_bool": {
75+
"crossline_channel_bool": {
7676
"group": "Survey",
7777
"main": true,
7878
"label": "Cross-line",

simpeg_drivers-assets/uijson/tdem_inversion.ui.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
],
5959
"value": "dB/dt (T/s)"
6060
},
61-
"z_channel": {
61+
"vertical_channel": {
6262
"association": [
6363
"Cell",
6464
"Vertex"
@@ -74,7 +74,7 @@
7474
"enabled": true,
7575
"value": ""
7676
},
77-
"z_uncertainty": {
77+
"vertical_uncertainty": {
7878
"association": [
7979
"Cell",
8080
"Vertex"
@@ -85,11 +85,11 @@
8585
"main": true,
8686
"label": "Uncertainty",
8787
"parent": "data_object",
88-
"dependency": "z_channel",
88+
"dependency": "vertical_channel",
8989
"dependencyType": "enabled",
9090
"value": ""
9191
},
92-
"y_channel": {
92+
"inline_channel": {
9393
"association": [
9494
"Cell",
9595
"Vertex"
@@ -105,7 +105,7 @@
105105
"enabled": false,
106106
"value": ""
107107
},
108-
"y_uncertainty": {
108+
"inline_uncertainty": {
109109
"association": [
110110
"Cell",
111111
"Vertex"
@@ -116,11 +116,11 @@
116116
"main": true,
117117
"label": "Uncertainty",
118118
"parent": "data_object",
119-
"dependency": "y_channel",
119+
"dependency": "inline_channel",
120120
"dependencyType": "enabled",
121121
"value": ""
122122
},
123-
"x_channel": {
123+
"crossline_channel": {
124124
"association": [
125125
"Cell",
126126
"Vertex"
@@ -136,7 +136,7 @@
136136
"enabled": false,
137137
"value": ""
138138
},
139-
"x_uncertainty": {
139+
"crossline_uncertainty": {
140140
"association": [
141141
"Cell",
142142
"Vertex"
@@ -147,7 +147,7 @@
147147
"main": true,
148148
"label": "Uncertainty",
149149
"parent": "data_object",
150-
"dependency": "x_channel",
150+
"dependency": "crossline_channel",
151151
"dependencyType": "enabled",
152152
"value": ""
153153
},

simpeg_drivers/plate_simulation/match/driver.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,13 @@ def batch_files_score(
485485
logger.warning("No survey found in %s, skipping.", sim_file)
486486
continue
487487

488-
simulated = get_data_array(survey.get_entity("Iteration_0_z")[0])
488+
data_entity = survey.get_entity("Iteration_0_vertical")[0]
489+
490+
if data_entity is None:
491+
data_entity = survey.get_entity("Iteration_0_z")[0]
492+
493+
simulated = get_data_array(data_entity)
494+
489495
pred = time_projection @ (spatial_projection @ simulated.T).T
490496
scale = max_late_val / np.max(np.abs(pred[-1, :]))
491497
pred = normalized_data(pred, scale=scale, threshold=max_late_val)

tests/plate_simulation/runtest/match_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_matching_driver(tmp_path: Path):
159159
# Modify the data slightly
160160
with Workspace(new_file) as sim_geoh5:
161161
survey = fetch_survey(sim_geoh5)
162-
prop_group = survey.get_entity("Iteration_0_z")[0]
162+
prop_group = survey.get_entity("Iteration_0_vertical")[0]
163163

164164
# Alter the signal to simulate different plate models
165165
scale = signal.windows.gaussian(survey.n_vertices, 2**ii)
@@ -183,7 +183,7 @@ def test_matching_driver(tmp_path: Path):
183183
survey.vertices = rotate_xyz(survey.vertices, [0, 0, 0], 215.0)
184184

185185
# Flip the data to simulate up-dip measurements
186-
prop_group = survey.get_entity("Iteration_0_z")[0]
186+
prop_group = survey.get_entity("Iteration_0_vertical")[0]
187187
for uid in prop_group.properties:
188188
child = survey.get_entity(uid)[0]
189189
child.values = child.values[::-1]

tests/run_tests/driver_ground_tem_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def test_ground_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
180180
data = {}
181181
uncertainties = {}
182182
channels = {
183-
"z": "dBzdt",
183+
"vertical": "vertical",
184184
}
185185

186186
for chan, cname in channels.items():
@@ -209,13 +209,13 @@ def test_ground_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
209209
data_kwargs = {}
210210
for chan in channels:
211211
data_kwargs[f"{chan}_channel"] = components.survey.fetch_property_group(
212-
name=f"dB{chan}dt"
212+
name="vertical"
213213
)
214214
data_kwargs[f"{chan}_uncertainty"] = components.survey.fetch_property_group(
215-
name=f"dB{chan}dt uncertainties"
215+
name="vertical uncertainties"
216216
)
217217

218-
orig_dBzdt = geoh5.get_entity("Iteration_0_z_[0]")[0].values
218+
orig_dBzdt = geoh5.get_entity("Iteration_0_vertical_[0]")[0].values
219219

220220
# Run the inverse
221221
params = TDEMInversionOptions.build(

tests/run_tests/driver_joint_surveys_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def test_joint_surveys_tem_run(
364364
data = {}
365365
uncertainties = {}
366366
channels = {
367-
"z": "dBzdt",
367+
"vertical": "vertical",
368368
}
369369
survey = components.survey
370370
for cname in channels.values():
@@ -390,10 +390,10 @@ def test_joint_surveys_tem_run(
390390
data_kwargs = {}
391391
for chan in channels:
392392
data_kwargs[f"{chan}_channel"] = components.survey.fetch_property_group(
393-
name=f"dB{chan}dt"
393+
name="vertical"
394394
)
395395
data_kwargs[f"{chan}_uncertainty"] = components.survey.fetch_property_group(
396-
name=f"dB{chan}dt uncertainties"
396+
name="vertical uncertainties"
397397
)
398398

399399
# Run the inverse

0 commit comments

Comments
 (0)