@@ -398,13 +398,13 @@ def dtm(self):
398398 def dtm (self , dtm ):
399399 """Set a dtm to the model.
400400 The dtm is a function that can be called for dtm(xy) where xy is
401- a numpy array of xy locations. The function will return an array of
401+ a numpy array of xy locations. The function will return an array of
402402 z values corresponding to the elevation at xy.
403403
404404 Parameters
405405 ----------
406406 dtm : callable
407-
407+
408408 """
409409 if not callable (dtm ):
410410 raise BaseException (
@@ -431,6 +431,14 @@ def series(self):
431431 series .append (f )
432432 return series
433433
434+ @property
435+ def intrusions (self ):
436+ intrusions = []
437+ for f in self .features :
438+ if f .type == "intrusion" :
439+ intrusions .append (f )
440+ return intrusions
441+
434442 @property
435443 def faults_displacement_magnitude (self ):
436444 displacements = []
@@ -500,7 +508,7 @@ def _add_feature(self, feature):
500508 self ._add_unconformity_above (feature )
501509 feature .model = self
502510
503- def data_for_feature (self , feature_name :str )-> pd .DataFrame :
511+ def data_for_feature (self , feature_name : str ) -> pd .DataFrame :
504512 return self .data .loc [self .data ["feature_name" ] == feature_name , :]
505513
506514 @property
@@ -1008,7 +1016,7 @@ def create_and_add_folded_fold_frame(
10081016 fold_frame : StructuralFrame, optional
10091017 the fold frame for the fold if not specified uses last feature added
10101018
1011- kwargs : dict
1019+ kwargs : dict
10121020 parameters passed to child functions
10131021
10141022 Returns
@@ -1080,9 +1088,14 @@ def create_and_add_intrusion(
10801088 intrusion_network_parameters = {},
10811089 lateral_extent_sgs_parameters = {},
10821090 vertical_extent_sgs_parameters = {},
1091+ geometric_scaling_parameters = {},
1092+ faults = None , # LG seems unused?
10831093 ** kwargs ,
10841094 ):
10851095 """
1096+
1097+ Note
1098+ -----
10861099 An intrusion in built in two main steps:
10871100 (1) Intrusion builder: intrusion builder creates the intrusion structural frame.
10881101 This object is curvilinear coordinate system of the intrusion constrained with intrusion network points,
@@ -1126,7 +1139,7 @@ def create_and_add_intrusion(
11261139 intrusion feature
11271140
11281141 """
1129- if intrusions == False :
1142+ if intrusions is False :
11301143 logger .error ("Libraries not installed" )
11311144 raise Exception ("Libraries not installed" )
11321145
@@ -1149,6 +1162,7 @@ def create_and_add_intrusion(
11491162 intrusion_frame_builder = IntrusionFrameBuilder (
11501163 interpolator , name = intrusion_frame_name , model = self , ** kwargs
11511164 )
1165+ intrusion_frame_builder .post_intrusion_faults = faults # LG unused?
11521166
11531167 # -- create intrusion network
11541168 intrusion_frame_builder .set_intrusion_network_parameters (
@@ -1172,8 +1186,9 @@ def create_and_add_intrusion(
11721186
11731187 intrusion_frame = intrusion_frame_builder .frame
11741188
1175- # -- create intrusion builder to simulate distance thresholds
1176- # along frame coordinates
1189+ self ._add_faults (intrusion_frame_builder , features = faults )
1190+
1191+ # -- create intrusion builder to simulate distance thresholds along frame coordinates
11771192 intrusion_builder = IntrusionBuilder (
11781193 intrusion_frame , model = self , name = f"{ intrusion_name } _feature"
11791194 )
@@ -1185,8 +1200,10 @@ def create_and_add_intrusion(
11851200 intrusion_builder .build_arguments = {
11861201 "lateral_extent_sgs_parameters" : lateral_extent_sgs_parameters ,
11871202 "vertical_extent_sgs_parameters" : vertical_extent_sgs_parameters ,
1203+ "geometric_scaling_parameters" : geometric_scaling_parameters ,
11881204 }
11891205 intrusion_feature = intrusion_builder .feature
1206+ # self._add_faults(intrusion_feature, features = faults)
11901207 self ._add_feature (intrusion_feature )
11911208
11921209 return intrusion_feature
@@ -1647,7 +1664,7 @@ def create_and_add_fault(
16471664
16481665 return fault
16491666
1650- def rescale (self , points :np .ndarray , inplace :bool = True ) -> np .ndarray :
1667+ def rescale (self , points : np .ndarray , inplace : bool = True ) -> np .ndarray :
16511668 """
16521669 Convert from model scale to real world scale - in the future this
16531670 should also do transformations?
@@ -1669,7 +1686,7 @@ def rescale(self, points:np.ndarray, inplace:bool=True) ->np.ndarray:
16691686 points += self .origin
16701687 return points
16711688
1672- def scale (self , points :np .ndarray , inplace :bool = True )-> np .ndarray :
1689+ def scale (self , points : np .ndarray , inplace : bool = True ) -> np .ndarray :
16731690 """Take points in UTM coordinates and reproject
16741691 into scaled model space
16751692
0 commit comments