File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,18 +115,16 @@ def from_maxwell_plate(cls, plate: MaxwellPlate) -> Self:
115115 raise ValueError ("Maxwell plate must have its geometry set." )
116116 return cls (PlateModel .from_maxwell_plate_geometry (plate .geometry ))
117117
118- def to_maxwell_plate (
119- self , workspace : Workspace , name : str | None = None
120- ) -> MaxwellPlate :
118+ def to_maxwell_plate (self , workspace : Workspace , ** plate_kwargs ) -> MaxwellPlate :
121119 """
122120 Save the Plate as a MaxwellPlate entity in the provided workspace.
123121
124122 :param workspace: Workspace to save the MaxwellPlate in.
125- :param name: Name of the MaxwellPlate entity .
123+ :param plate_kwargs: Arguments passed on to the MaxwellPlate instantiation .
126124 """
127125 with fetch_active_workspace (workspace ) as ws :
128126 plate = MaxwellPlate .create (
129- ws , name = name , geometry = self .params .to_maxwell_plate_geometry ()
127+ ws , geometry = self .params .to_maxwell_plate_geometry (), ** plate_kwargs
130128 )
131129 return plate
132130
Original file line number Diff line number Diff line change @@ -223,13 +223,6 @@ def test_maxwell_plate_integration(tmp_path):
223223 maxwell_plate .geometry .rotation = 10.0
224224
225225 with pytest .warns (UserWarning , match = "Plunging plate" ):
226- plate = Plate .from_maxwell_plate (maxwell_plate )
227-
228- assert plate .params .strike_length == 100
229- assert plate .params .dip_length == 300
230- assert plate .params .width == 20
231- assert plate .params .easting == 100
232- assert plate .params .northing == 0
233- assert plate .params .elevation == 0
234- assert plate .params .direction == 90
235- assert plate .params .dip == 45
226+ new_plate = Plate .from_maxwell_plate (maxwell_plate )
227+
228+ assert new_plate .params == plate .params
You can’t perform that action at this time.
0 commit comments