File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88# '
99# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1010
11- import warnings
1211
1312import numpy as np
1413from geoh5py import Workspace
1514from geoh5py .objects import Octree , Surface
1615from geoh5py .shared .utils import fetch_active_workspace
17- from pydantic import BaseModel , ConfigDict , Field , model_validator
16+ from pydantic import BaseModel , ConfigDict , Field
1817
1918from geoapps_utils .utils .transformations import (
2019 rotate_points ,
@@ -56,18 +55,6 @@ class PlateModel(BaseModel):
5655 direction : float = Field (default = 0.0 , alias = "dip_direction" )
5756 dip : float = 0.0
5857
59- @model_validator (mode = "after" )
60- def check_origin_set (self ):
61- """Default origin should be transparent to user if not explicitly provided."""
62- if not all (
63- k in self .model_fields_set for k in ["easting" , "northing" , "elevation" ]
64- ):
65- warnings .warn (
66- "Not all origin parameters ('easting', 'northing', 'elevation') were set. "
67- "Missing parameters default to 0 and may lead to unexpected results."
68- )
69- return self
70-
7158 @property
7259 def origin (self ) -> tuple [float , float , float ]:
7360 return (self .easting , self .northing , self .elevation )
You can’t perform that action at this time.
0 commit comments