@@ -345,7 +345,33 @@ def create_data_from_geometry(
345345 fault_frame_data .loc [mask , ["nx" , "ny" , "nz" ]] /= minor_axis * 0.5
346346 # self.builders[0].add_orthogonal_feature(self,
347347 # feature, w=1.0, region=None, step=1, B=0):
348-
348+ if np .sum (mask ) == 0 :
349+ fault_frame_data .loc [
350+ len (fault_frame_data ),
351+ [
352+ "X" ,
353+ "Y" ,
354+ "Z" ,
355+ "feature_name" ,
356+ "nx" ,
357+ "ny" ,
358+ "nz" ,
359+ "val" ,
360+ "coord" ,
361+ "w" ,
362+ ],
363+ ] = [
364+ fault_center [0 ],
365+ fault_center [1 ],
366+ fault_center [2 ],
367+ self .name ,
368+ fault_normal_vector [0 ] / minor_axis * 0.5 ,
369+ fault_normal_vector [1 ] / minor_axis * 0.5 ,
370+ fault_normal_vector [2 ] / minor_axis * 0.5 ,
371+ np .nan ,
372+ 0 ,
373+ w ,
374+ ]
349375 if major_axis is not None :
350376 fault_tips [0 , :] = fault_center [:3 ] + strike_vector * 0.5 * major_axis
351377 fault_tips [1 , :] = fault_center [:3 ] - strike_vector * 0.5 * major_axis
@@ -437,32 +463,7 @@ def create_data_from_geometry(
437463 1 ,
438464 w ,
439465 ]
440- fault_frame_data .loc [
441- len (fault_frame_data ),
442- [
443- "X" ,
444- "Y" ,
445- "Z" ,
446- "feature_name" ,
447- "nx" ,
448- "ny" ,
449- "nz" ,
450- "val" ,
451- "coord" ,
452- "w" ,
453- ],
454- ] = [
455- fault_center [0 ],
456- fault_center [1 ],
457- fault_center [2 ],
458- self .name ,
459- fault_normal_vector [0 ],
460- fault_normal_vector [1 ],
461- fault_normal_vector [2 ],
462- np .nan ,
463- 0 ,
464- w ,
465- ]
466+
466467 self .add_data_from_data_frame (fault_frame_data )
467468 if fault_trace_anisotropy > 0 :
468469 self .add_fault_trace_anisotropy (fault_trace_anisotropy )
@@ -519,7 +520,14 @@ def splayregion(xyz):
519520 self .builders [0 ].add_equality_constraints (splay , splayregion , scalefactor )
520521 return splayregion
521522
522- def add_fault_trace_anisotropy (self , w = 1.0 ):
523+ def add_fault_trace_anisotropy (self , w : float = 1.0 ):
524+ """_summary_
525+
526+ Parameters
527+ ----------
528+ w : float, optional
529+ _description_, by default 1.0
530+ """
523531 trace_data = self .builders [0 ].data .loc [self .builders [0 ].data ["val" ] == 0 , :]
524532 coefficients = np .polyfit (
525533 trace_data ["X" ],
@@ -539,7 +547,16 @@ def add_fault_trace_anisotropy(self, w=1.0):
539547 anisotropy_feature , w = w , region = None , step = 1 , B = 0
540548 )
541549
542- def add_fault_dip_anisotropy (self , dip , w = 1.0 ):
550+ def add_fault_dip_anisotropy (self , dip : np .ndarray , w : float = 1.0 ):
551+ """_summary_
552+
553+ Parameters
554+ ----------
555+ dip : np.ndarray
556+ _description_
557+ w : float, optional
558+ _description_, by default 1.0
559+ """
543560 trace_data = self .builders [0 ].data .loc [self .builders [0 ].data ["val" ] == 0 , :]
544561 coefficients = np .polyfit (
545562 trace_data ["X" ],
0 commit comments