Skip to content

Commit 66a6f1d

Browse files
committed
fix: remove initialisation
1 parent 66b7f94 commit 66a6f1d

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

LoopStructural/modelling/core/geological_model.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,7 @@ def fault_names(self):
402402
"""
403403
return [f.name for f in self.faults]
404404

405-
def check_inialisation(self):
406-
if self.data is None:
407-
logger.error("Data not associated with GeologicalModel. Run set_data")
408-
return False
409-
if self.data.shape[0] > 0:
410-
return True
405+
411406

412407
def to_file(self, file):
413408
"""Save a model to a pickle file requires dill
@@ -600,9 +595,7 @@ def create_and_add_foliation(
600595
An interpolator will be chosen by calling :meth:`LoopStructural.GeologicalModel.get_interpolator`
601596
602597
"""
603-
if not self.check_inialisation():
604-
logger.warning(f"{series_surface_data} not added, model not initialised")
605-
return
598+
606599
# if tol is not specified use the model default
607600
if tol is None:
608601
tol = self.tol
@@ -674,8 +667,7 @@ def create_and_add_fold_frame(
674667
fold_frame : FoldFrame
675668
the created fold frame
676669
"""
677-
if not self.check_inialisation():
678-
return False
670+
679671
if tol is None:
680672
tol = self.tol
681673

@@ -751,8 +743,7 @@ def create_and_add_folded_foliation(
751743
:class:`LoopStructural.modelling.features.builders.FoldedFeatureBuilder`
752744
753745
"""
754-
if not self.check_inialisation():
755-
return False
746+
756747
if tol is None:
757748
tol = self.tol
758749

@@ -852,8 +843,7 @@ def create_and_add_folded_fold_frame(
852843
see :class:`LoopStructural.modelling.features.fold.FoldEvent`,
853844
:class:`LoopStructural.modelling.features.builders.FoldedFeatureBuilder`
854845
"""
855-
if not self.check_inialisation():
856-
return False
846+
857847
if tol is None:
858848
tol = self.tol
859849

LoopStructural/modelling/features/builders/_fault_builder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def create_data_from_geometry(
150150
np.logical_and(fault_frame_data["coord"] == 0, fault_frame_data["val"] == 0),
151151
["X", "Y"],
152152
].to_numpy()
153+
self.fault_dip = fault_dip
153154
if fault_normal_vector is None:
154155
if fault_frame_data.loc[
155156
np.logical_and(fault_frame_data["coord"] == 0, fault_frame_data["nx"].notna())].shape[0]>0:

LoopStructural/modelling/features/fault/_fault_segment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def fault_major_axis(self):
104104
if self.builder is None:
105105
raise ValueError("Fault builder not set")
106106
return self.builder.fault_major_axis
107-
107+
108108
@property
109109
def fault_intermediate_axis(self):
110110
if self.builder is None:

0 commit comments

Comments
 (0)