Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
"main": true,
"group": "Mesh and models",
"label": "Model units",
"tooltip": "Select the units of the model",
"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)"
},
"starting_model": {
Expand Down
2 changes: 1 addition & 1 deletion simpeg_drivers/joint/joint_surveys/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion simpeg_drivers/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclear what would happen if the methods are EM or DC, with a model_type=None.
Can we update one of the tests to validate the outcome?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked, and the only references to this model_type are checking if model_type == ModelTypeEnum.resistivity so we should be ok, but I'll add a check to one of the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

conductivity_model: float | FloatData | None = Field(
None,
validation_alias=AliasChoices("background_conductivity", "conductivity_model"),
Expand Down
2 changes: 2 additions & 0 deletions tests/run_tests/driver_dc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions tests/run_tests/driver_grav_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading