Skip to content

Commit 2fed366

Browse files
committed
remove warning for origin not set
1 parent 644774f commit 2fed366

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

geoapps_utils/modelling/plates.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
# '
99
# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1010

11-
import warnings
1211

1312
import numpy as np
1413
from geoh5py import Workspace
1514
from geoh5py.objects import Octree, Surface
1615
from geoh5py.shared.utils import fetch_active_workspace
17-
from pydantic import BaseModel, ConfigDict, Field, model_validator
16+
from pydantic import BaseModel, ConfigDict, Field
1817

1918
from 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)

0 commit comments

Comments
 (0)