Skip to content
Merged
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
5 changes: 4 additions & 1 deletion simpeg_drivers/components/factories/directives_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,10 @@ def assemble_keyword_arguments(
name=None,
):
receivers = inversion_object.entity
channels = getattr(receivers, "channels", [None])
channels = [
float(val) if val else None
for val in getattr(receivers, "channels", [None])
]
components = list(inversion_object.observed)
ordering = inversion_object.survey.ordering
n_locations = len(np.unique(ordering[:, 2]))
Expand Down
7 changes: 7 additions & 0 deletions tests/run_tests/driver_mt_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ def test_magnetotellurics_fwr_run(
)
with get_workspace(tmp_path / "inversion_test.ui.geoh5") as geoh5:
components = SyntheticsComponents(geoh5, options=opts)

# Test for label index supporting ints - bypass setter
components.survey.edit_em_metadata({"Channels": [10, 100, 1000]})

params = MTForwardOptions.build(
geoh5=geoh5,
mesh=components.mesh,
Expand All @@ -127,6 +131,9 @@ def test_magnetotellurics_fwr_run(
fwr_driver = MTForwardDriver(params)
fwr_driver.run()

with Workspace(tmp_path / "inversion_test.ui.geoh5") as geoh5:
assert geoh5.get_entity("Iteration_0_zyy_real_[0]")[0] is not None


def test_magnetotellurics_run(tmp_path: Path, max_iterations=1, pytest=True):
# pass
Expand Down
Loading