File tree Expand file tree Collapse file tree
simpeg_drivers/components/factories Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -489,7 +489,10 @@ def assemble_keyword_arguments(
489489 name = None ,
490490 ):
491491 receivers = inversion_object .entity
492- channels = getattr (receivers , "channels" , [None ])
492+ channels = [
493+ float (val ) if val else None
494+ for val in getattr (receivers , "channels" , [None ])
495+ ]
493496 components = list (inversion_object .observed )
494497 ordering = inversion_object .survey .ordering
495498 n_locations = len (np .unique (ordering [:, 2 ]))
Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ def test_magnetotellurics_fwr_run(
106106 )
107107 with get_workspace (tmp_path / "inversion_test.ui.geoh5" ) as geoh5 :
108108 components = SyntheticsComponents (geoh5 , options = opts )
109+
110+ # Test for label index supporting ints - bypass setter
111+ components .survey .edit_em_metadata ({"Channels" : [10 , 100 , 1000 ]})
112+
109113 params = MTForwardOptions .build (
110114 geoh5 = geoh5 ,
111115 mesh = components .mesh ,
@@ -127,6 +131,9 @@ def test_magnetotellurics_fwr_run(
127131 fwr_driver = MTForwardDriver (params )
128132 fwr_driver .run ()
129133
134+ with Workspace (tmp_path / "inversion_test.ui.geoh5" ) as geoh5 :
135+ assert geoh5 .get_entity ("Iteration_0_zyy_real_[0]" )[0 ] is not None
136+
130137
131138def test_magnetotellurics_run (tmp_path : Path , max_iterations = 1 , pytest = True ):
132139 # pass
You can’t perform that action at this time.
0 commit comments