Skip to content
2 changes: 0 additions & 2 deletions simpeg_drivers/plate_simulation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
# (see LICENSE file at the root of this source code package). '
# '
# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

from .driver import PlateSimulationDriver
2 changes: 0 additions & 2 deletions simpeg_drivers/plate_simulation/match/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
# (see LICENSE file at the root of this source code package). '
# '
# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

from .driver import PlateMatchDriver
12 changes: 12 additions & 0 deletions simpeg_drivers/plate_simulation/match/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
from pathlib import Path
from typing import Self

import matplotlib


matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
from dask.distributed import Client, Future, progress
Expand Down Expand Up @@ -194,6 +198,7 @@ def _create_plate_from_parameters(
:return: MaxwellPlate object created from the parameters.
"""
center = self.params.survey.vertices[index_center]

center[2] = (
self._drape_heights[index_center]
- model_options.overburden_options.thickness
Expand Down Expand Up @@ -364,6 +369,10 @@ def run(self):
query, strike_angle[ii]
)
flip = is_up_dip(observed[:, indices])

if flip:
indices = np.flip(indices, axis=0)

# Loop through files and compute scores and find the best match
scores, centers = self.run_scores(spatial_projection, observed[:, indices])
ranked = np.argsort(scores)
Expand Down Expand Up @@ -433,6 +442,9 @@ def run_scores(self, spatial_projection, data) -> tuple[np.ndarray, np.ndarray]:
)
tasks = []
for file_batch in file_split:
if len(file_batch) == 0:
continue

args = (
file_batch,
spatial_projection,
Expand Down
2 changes: 0 additions & 2 deletions simpeg_drivers/plate_simulation/sweep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
# (see LICENSE file at the root of this source code package). '
# '
# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

from .driver import PlateSweepDriver
2 changes: 1 addition & 1 deletion tests/run_tests/driver_joint_pgi_homogeneous_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def test_homogeneous_run(

# Remove inversion type as per current json on file
options = driver.out_group.options
del options["inversion_type"]
options.pop("inversion_type", None)
driver.out_group.options = options
drivers.append(driver)
else:
Expand Down
Loading