Skip to content

Commit 368b227

Browse files
committed
Replace with Deprecated annotation
1 parent 8ad2083 commit 368b227

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

  • simpeg_drivers/potential_fields/magnetic_vector

simpeg_drivers/potential_fields/magnetic_vector/params.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
from pathlib import Path
1515
from typing import ClassVar
16-
from warnings import warn
1716

1817
from geoh5py.data import FloatData
18+
from geoh5py.ui_json.annotations import Deprecated
1919
from pydantic import model_validator
2020

2121
from simpeg_drivers import assets_path
@@ -129,19 +129,10 @@ class MVIInversionOptions(BaseInversionOptions):
129129
inducing_field_strength: float | FloatData = 50000.0
130130
inducing_field_inclination: float | FloatData = 90.0
131131
inducing_field_declination: float | FloatData = 0.0
132+
133+
lower_bound: Deprecated | None = None
134+
132135
starting_inclination: float | FloatData | None = None
133136
starting_declination: float | FloatData | None = None
134137
reference_inclination: float | FloatData | None = None
135138
reference_declination: float | FloatData | None = None
136-
137-
@model_validator(mode="after")
138-
def validate_lower_bound(self):
139-
if self.lower_bound is not None:
140-
warn(
141-
"Parameter 'lower_bound' for Magnetic Vector Inversion has been deprecated. "
142-
"Defaulting to the negative value of 'upper_bound'.",
143-
DeprecationWarning,
144-
stacklevel=1,
145-
)
146-
self.lower_bound = None
147-
return self

0 commit comments

Comments
 (0)