File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ def data_misfit(self):
6565 fun .name = f"Group_{ label .upper ()} :Tile_{ ii } "
6666
6767 multipliers += [
68- getattr (self .params , f"group_{ label } _multiplier" ) ** 2.0
68+ (getattr (self .params , f"group_{ label } _multiplier" ) or 1.0 )
69+ ** 2.0
6970 ] * len (driver .data_misfit .objfcts )
7071
7172 if self .client :
Original file line number Diff line number Diff line change 1515from typing import ClassVar
1616
1717from geoh5py .data import FloatData , ReferencedData
18+ from geoh5py .groups import SimPEGGroup
1819from geoh5py .objects import Octree
1920
2021from simpeg_drivers import assets_path
@@ -49,6 +50,8 @@ class JointPetrophysicsOptions(BaseJointOptions):
4950 title : str = "Joint Petrophysically Guided Inversion (PGI)"
5051 inversion_type : str = "joint petrophysics"
5152
53+ group_a_multiplier : float | None = None
5254 group_b_multiplier : float | None = None
55+ group_b : SimPEGGroup | None = None
5356 mesh : Octree
5457 models : JointPetrophysicsModelOptions
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ def test_homogeneous_run(
143143 orig_data = []
144144 petrophysics = None
145145 gradient_rotation = None
146- mesh = None
146+
147147 for suffix in "AB" :
148148 components = SyntheticsComponents (
149149 geoh5 = geoh5 ,
@@ -226,6 +226,19 @@ def test_homogeneous_run(
226226 )
227227 drivers .append (MagneticInversionDriver (params ))
228228
229+ # Test if single group is valid
230+ params = JointPetrophysicsOptions .build (
231+ topography_object = topography ,
232+ geoh5 = geoh5 ,
233+ group_a = drivers [0 ].out_group ,
234+ mesh = global_mesh ,
235+ petrophysical_model = petrophysics ,
236+ )
237+ driver = JointPetrophysicsDriver (params )
238+ assert len (driver .data_misfit .objfcts ) == 1
239+ assert driver .data_misfit .multipliers == [1.0 ]
240+
241+ # Re-build full
229242 params = JointPetrophysicsOptions .build (
230243 topography_object = topography ,
231244 geoh5 = geoh5 ,
You can’t perform that action at this time.
0 commit comments