1111from typing import TypeVar
1212
1313import numpy as np
14+ from geoapps_utils .modelling .plates import PlateModel
1415from geoh5py .objects import Points
1516from pydantic import (
1617 BaseModel ,
@@ -29,20 +30,12 @@ class PlateOptions(BaseModel):
2930 Parameters describing an anomalous plate.
3031
3132 :param plate: Value given to the plate(s).
32- :param width: V-size of the plate.
33- :param strike_length: U-size of the plate.
34- :param dip_length: W-size of the plate.
35- :param dip: Orientation of the v-axis in degree from horizontal.
36- :param dip_direction: Orientation of the u axis in degree from north.
33+ :param geometry: Parameters describing the plate geometry.
3734 :param reference: Point of rotation to be 'center' or 'top'.
3835 :param number: Number of offset plates to be created.
3936 :param spacing: Spacing between plates.
4037 :param relative_locations: If True locations are relative to survey in xy and
4138 mean topography in z.
42- :param easting: Easting offset relative to survey.
43- :param northing: Northing offset relative to survey.
44- :param elevation: plate(s) elevation. May be true elevation or relative to
45- overburden or topography.
4639 :param reference_surface: Switches between using topography and overburden as
4740 elevation reference of the plate.
4841 :param reference_type: Type of reference for plate elevation. Can be 'mean'
@@ -53,18 +46,11 @@ class PlateOptions(BaseModel):
5346 model_config = ConfigDict (arbitrary_types_allowed = True )
5447
5548 name : str = "Plate"
56- plate : float
57- width : float
58- strike_length : float
59- dip_length : float
60- dip : float = 90.0
61- dip_direction : float = 90.0
49+ plate_property : float
50+ geometry : PlateModel
6251 number : int = 1
6352 spacing : float = 0.0
6453 relative_locations : bool = False
65- easting : float = 0.0
66- northing : float = 0.0
67- elevation : float
6854 reference_surface : str = "topography"
6955 reference_type : str = "mean"
7056
@@ -82,7 +68,7 @@ def single_plate(self):
8268 @property
8369 def halfplate (self ):
8470 """Compute half the z-projection length of the plate."""
85- return 0.5 * self .dip_length * np .sin (np .deg2rad (self .dip ))
71+ return 0.5 * self .geometry . dip_length * np .sin (np .deg2rad (self . geometry .dip ))
8672
8773 def center (
8874 self ,
@@ -104,11 +90,11 @@ def _get_xy(self, survey: Points) -> tuple[float, float]:
10490
10591 if self .relative_locations :
10692 return (
107- survey .vertices [:, 0 ].mean () + self .easting ,
108- survey .vertices [:, 1 ].mean () + self .northing ,
93+ survey .vertices [:, 0 ].mean () + self .geometry . origin [ 0 ] ,
94+ survey .vertices [:, 1 ].mean () + self .geometry . origin [ 1 ] ,
10995 )
11096
111- return self .easting , self .northing
97+ return self .geometry . origin [ 0 ] , self .geometry . origin [ 1 ]
11298
11399 def _get_z (self , surface : Points , offset : float = 0.0 ) -> float :
114100 """
@@ -122,9 +108,9 @@ def _get_z(self, surface: Points, offset: float = 0.0) -> float:
122108 raise ValueError ("Topography object has no vertices." )
123109 if self .relative_locations :
124110 z = getattr (surface .vertices [:, 2 ], self .reference_type )()
125- z += offset + self .elevation - self .halfplate
111+ z += offset + self .geometry . elevation - self .halfplate
126112 else :
127- z = self .elevation
113+ z = self .geometry . elevation
128114
129115 return z
130116
@@ -138,7 +124,7 @@ class OverburdenOptions(BaseModel):
138124 """
139125
140126 thickness : float
141- overburden : float
127+ overburden_property : float
142128
143129
144130class ModelOptions (BaseModel ):
@@ -153,5 +139,5 @@ class ModelOptions(BaseModel):
153139 model_config = ConfigDict (arbitrary_types_allowed = True )
154140
155141 background : float
156- overburden_model : OverburdenOptions
157- plate_model : PlateOptions
142+ overburden : OverburdenOptions
143+ plate : PlateOptions
0 commit comments