From c34051ef974c1fbef76daa89affb86a0d28a1571 Mon Sep 17 00:00:00 2001 From: benjamink Date: Tue, 27 Jan 2026 12:42:50 -0800 Subject: [PATCH 1/3] make model_type optional in joint surveys ui.json --- simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json | 4 +++- simpeg_drivers/joint/joint_surveys/options.py | 2 +- simpeg_drivers/options.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json index e3e1b610..92c267f4 100644 --- a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json @@ -76,7 +76,9 @@ "main": true, "group": "Mesh and models", "label": "Model units", - "tooltip": "Select the units of the model", + "tooltip": "Allows users to enter resistivity values for conductivity inversions.", + "optional": true, + "enabled": false, "value": "Conductivity (S/m)" }, "starting_model": { diff --git a/simpeg_drivers/joint/joint_surveys/options.py b/simpeg_drivers/joint/joint_surveys/options.py index edc0bbe9..a2dcb787 100644 --- a/simpeg_drivers/joint/joint_surveys/options.py +++ b/simpeg_drivers/joint/joint_surveys/options.py @@ -31,7 +31,7 @@ class JointSurveysModelOptions(JointModelOptions): :param reference_model: The reference model for the inversion. """ - model_type: ModelTypeEnum = ModelTypeEnum.conductivity + model_type: ModelTypeEnum | None = ModelTypeEnum.conductivity starting_model: float | FloatData | None = None reference_model: float | FloatData | None = None diff --git a/simpeg_drivers/options.py b/simpeg_drivers/options.py index d086a4ea..ee9b78a7 100644 --- a/simpeg_drivers/options.py +++ b/simpeg_drivers/options.py @@ -335,7 +335,7 @@ class ConductivityModelOptions(ModelOptions): Options for the conductivity model used in all of EM methods. """ - model_type: ModelTypeEnum = ModelTypeEnum.conductivity + model_type: ModelTypeEnum | None = ModelTypeEnum.conductivity conductivity_model: float | FloatData | None = Field( None, validation_alias=AliasChoices("background_conductivity", "conductivity_model"), From 9e923f8ea7d7ddd58700763dcee2a12e729841b4 Mon Sep 17 00:00:00 2001 From: benk-mira <81254271+benk-mira@users.noreply.github.com> Date: Wed, 28 Jan 2026 08:32:54 -0800 Subject: [PATCH 2/3] Update simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json Co-authored-by: domfournier --- simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json index 92c267f4..1ab64afa 100644 --- a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json @@ -76,7 +76,7 @@ "main": true, "group": "Mesh and models", "label": "Model units", - "tooltip": "Allows users to enter resistivity values for conductivity inversions.", + "tooltip": "Change the model units between S/m or Ohm.m, for electromagnetic and direct-current surveys.", "optional": true, "enabled": false, "value": "Conductivity (S/m)" From 22417adb1bc0fa001ae2a0d260fe543d8c9cd728 Mon Sep 17 00:00:00 2001 From: benjamink Date: Wed, 28 Jan 2026 09:09:59 -0800 Subject: [PATCH 3/3] add model_type=None for one conductivity and one potential field runtest to check that logic works with None --- tests/run_tests/driver_dc_test.py | 2 ++ tests/run_tests/driver_grav_test.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/run_tests/driver_dc_test.py b/tests/run_tests/driver_dc_test.py index d0a4cdcd..72101839 100644 --- a/tests/run_tests/driver_dc_test.py +++ b/tests/run_tests/driver_dc_test.py @@ -78,6 +78,7 @@ def test_dc_3d_fwr_run( mesh=components.mesh, topography_object=components.topography, data_object=components.survey, + model_type=None, starting_model=components.model, ) fwr_driver = DC3DForwardDriver(params) @@ -104,6 +105,7 @@ def test_dc_3d_run( mesh=components.mesh, topography_object=components.topography, data_object=potential.parent, + model_type=None, starting_model=1e-2, reference_model=1e-2, s_norm=0.0, diff --git a/tests/run_tests/driver_grav_test.py b/tests/run_tests/driver_grav_test.py index 1aba275c..8f797614 100644 --- a/tests/run_tests/driver_grav_test.py +++ b/tests/run_tests/driver_grav_test.py @@ -68,6 +68,7 @@ def test_gravity_fwr_run( geoh5=geoh5, mesh=components.mesh, topography_object=components.topography, + model_type=None, data_object=components.survey, starting_model=components.model, gz_channel_bool=True, @@ -142,6 +143,7 @@ def test_gravity_run( params = GravityInversionOptions.build( geoh5=geoh5, mesh=components.mesh, + model_type=None, data_object=gz.parent, s_norm=0.0, x_norm=gradient_norms,