File tree Expand file tree Collapse file tree
electricals/induced_polarization/three_dimensions
potential_fields/magnetic_scalar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ def save_data(self):
242242 data_dict [component ] = data_entity
243243 uncert_dict [component ] = uncert_entity
244244
245- data_types [component ][ind ] = data_entity .entity_type
245+ data_types [component ][channel ] = data_entity .entity_type
246246
247247 self ._observed_data_types = data_types
248248 self .update_params (data_dict , uncert_dict )
Original file line number Diff line number Diff line change @@ -674,7 +674,7 @@ def reshape(values):
674674 for comp in components
675675 ]
676676 ),
677- "channels" : np . arange ( len ( channels )) ,
677+ "channels" : channels ,
678678 "components" : components ,
679679 "sorting" : sorting ,
680680 "_reshape" : reshape ,
Original file line number Diff line number Diff line change 2525)
2626
2727
28+ class IP3DModelOptions (ConductivityModelOptions ):
29+ """
30+ ModelOptions class with defaulted lower bound.
31+ """
32+
33+ lower_bound : float | FloatData | None = 0
34+
35+
2836class IP3DForwardOptions (BaseForwardOptions ):
2937 """
3038 Induced Polarization 3D forward options.
Original file line number Diff line number Diff line change @@ -46,8 +46,6 @@ class JointPetrophysicsOptions(BaseJointOptions):
4646 )
4747
4848 title : str = "Joint Petrophysically Guided Inversion (PGI)"
49- physical_property : list [str ] = ["" ]
50-
5149 inversion_type : str = "joint petrophysics"
5250
5351 group_b_multiplier : float | None = None
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ class BaseJointOptions(CoreOptions):
3838
3939 model_config = ConfigDict (frozen = False )
4040
41+ forward_only : bool = False
42+ physical_property : str = ""
43+
4144 group_a : SimPEGGroup
4245 group_a_multiplier : float = 1.0
4346 group_b : SimPEGGroup
Original file line number Diff line number Diff line change 1717from geoh5py .data import FloatData
1818
1919from simpeg_drivers import assets_path
20- from simpeg_drivers .options import BaseForwardOptions , BaseInversionOptions
20+ from simpeg_drivers .options import (
21+ BaseForwardOptions ,
22+ BaseInversionOptions ,
23+ ModelOptions ,
24+ )
25+
26+
27+ class MagneticModelOptions (ModelOptions ):
28+ """
29+ ModelOptions class with defaulted lower bound.
30+ """
31+
32+ lower_bound : float | FloatData | None = 0
2133
2234
2335class MagneticForwardOptions (BaseForwardOptions ):
@@ -59,6 +71,8 @@ class MagneticForwardOptions(BaseForwardOptions):
5971 inducing_field_inclination : float | FloatData
6072 inducing_field_declination : float | FloatData
6173
74+ models : MagneticModelOptions
75+
6276
6377class MagneticInversionOptions (BaseInversionOptions ):
6478 """
@@ -121,3 +135,5 @@ class MagneticInversionOptions(BaseInversionOptions):
121135 inducing_field_strength : float | FloatData
122136 inducing_field_inclination : float | FloatData
123137 inducing_field_declination : float | FloatData
138+
139+ models : MagneticModelOptions
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ def test_joint_cross_gradient_inv_run(
239239 drivers .append (MVIInversionDriver (params ))
240240
241241 # Run the inverse
242- joint_params = JointCrossGradientOptions (
242+ joint_params = JointCrossGradientOptions . build (
243243 geoh5 = geoh5 ,
244244 topography_object = topography ,
245245 group_a = drivers [0 ].params .out_group ,
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ def test_homogeneous_run(
229229 )
230230 drivers .append (MagneticInversionDriver (params ))
231231
232- params = JointPetrophysicsOptions (
232+ params = JointPetrophysicsOptions . build (
233233 topography_object = topography ,
234234 geoh5 = geoh5 ,
235235 group_a = drivers [0 ].params .out_group ,
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def test_joint_surveys_inv_run(
139139
140140 active_model = drivers [0 ].params .mesh .get_entity ("active_cells" )[0 ]
141141 # Run the inverse
142- joint_params = JointSurveysOptions (
142+ joint_params = JointSurveysOptions . build (
143143 geoh5 = geoh5 ,
144144 active_cells = ActiveCellsOptions (active_model = active_model ),
145145 mesh = drivers [0 ].params .mesh ,
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def test_susceptibility_run(
116116 )
117117 params .write_ui_json (path = tmp_path / "Inv_run.ui.json" )
118118
119- assert params .lower_bound == 0.0
119+ assert params .models . lower_bound == 0.0
120120 driver = MagneticInversionDriver .start (str (tmp_path / "Inv_run.ui.json" ))
121121
122122 with Workspace (driver .params .geoh5 .h5file ) as run_ws :
You can’t perform that action at this time.
0 commit comments