Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Closed
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: 2 additions & 2 deletions plate_simulation-assets/uijson/plate_simulation.ui.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.2.0-beta.1",
"title": "Plate Simulation",
"icon": "maxwellplate",
"version": "0.2.0-alpha.1",
"title": "Plate simulation",
"documentation": "https://mirageoscience-plate-simulation.readthedocs-hosted.com/en/latest/",
"conda_environment": "plate_simulation",
"run_command": "plate_simulation.driver",
Expand Down
2 changes: 1 addition & 1 deletion plate_simulation/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def simulation_parameters(self) -> BaseForwardOptions:
raise ValueError("Input file data must be set.")

if input_file.data["inversion_type"] in PARAM_MAP:
return PARAM_MAP[input_file.data["inversion_type"]].build(input_file.data)
return PARAM_MAP[input_file.data["inversion_type"]].build(**input_file.data)

raise NotImplementedError(
f"Unknown inversion type: {input_file.data['inversion_type']}"
Expand Down
16 changes: 8 additions & 8 deletions tests/runtest/gravity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import numpy as np
from geoh5py import Workspace
from geoh5py.groups import SimPEGGroup
from simpeg_drivers.options import ActiveCellsOptions
from simpeg_drivers.potential_fields.gravity.options import GravityForwardOptions

from plate_simulation.driver import PlateSimulationDriver
Expand Down Expand Up @@ -59,23 +60,22 @@ def test_gravity_plate_simulation(tmp_path):
plate_model=plate_params,
)

options = GravityForwardOptions.build(
topography_object=topography,
data_object=survey,
geoh5=ws,
starting_model=0.1,
active_cells = ActiveCellsOptions(topography_object=topography)
inputs = {"geoh5": ws, "active_cells": active_cells, "data_object": survey}
options = GravityForwardOptions.model_construct(
**inputs,
)

gravity_inversion = SimPEGGroup.create(ws)
gravity_inversion.options = options.serialize()
gravity_forward = SimPEGGroup.create(ws)
gravity_forward.options = options.serialize()

params = PlateSimulationOptions(
title="test",
run_command="run",
geoh5=ws,
mesh=mesh_params,
model=model_params,
simulation=gravity_inversion,
simulation=gravity_forward,
)
driver = PlateSimulationDriver(params)
driver.run()
Expand Down