Skip to content

Commit 4b7168e

Browse files
benk-miraCopilot
andauthored
Update simpeg_drivers/plate_simulation/models/options.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c7c3ec9 commit 4b7168e

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

simpeg_drivers/plate_simulation/models/options.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,14 @@ def center(
7474
xyz = np.atleast_2d(
7575
[
7676
survey.vertices[:, 0].mean(),
77-
survey.vertices[:, 1].mean(),
78-
0,
79-
]
80-
)
77+
center_x = survey.vertices[:, 0].mean() + self.geometry.easting
78+
center_y = survey.vertices[:, 1].mean() + self.geometry.northing
79+
xyz = np.atleast_2d([center_x, center_y, 0])
8180
topo_at_center = topo_drape_elevation(
82-
xyz,
83-
surface.vertices,
84-
method="linear",
85-
triangulation=getattr(surface, "cells", None),
81+
xyz, surface.vertices, method="linear", triangulation=surface.cells
8682
)
8783

88-
return xyz[0, 0], xyz[0, 1], topo_at_center[0, 2] - self.geometry.elevation
84+
return center_x, center_y, topo_at_center[0, 2] - self.geometry.elevation
8985

9086

9187
class OverburdenOptions(BaseModel):

0 commit comments

Comments
 (0)