@@ -469,41 +469,42 @@ def _update_feature_names(self, dataframe):
469469
470470 @property
471471 def contacts (self ):
472- return self ._contacts
473-
474- @contacts .setter
475- def contacts (self , contacts ):
476- """Function to convert input contact to loopstructural input
477-
478- either uses the thickness values or assigns unique ids given
479- the units named in stratigraphic order
480-
481- Returns
482- -------
483- DataFrame
484- data frame with x,y,y,val/interface,feature_name
485- """
486- if contacts is None :
487- return
488- contacts = contacts .copy ()
489- self ._update_feature_names (contacts )
472+ contacts = self ._contacts .copy ()
490473 if self ._use_thickness :
491474 contacts ["val" ] = np .nan
492475 for k , v in self ._stratigraphic_value ().items ():
493476 contacts .loc [contacts ["name" ] == k , "val" ] = v
494477
495- self . _contacts = contacts .loc [
478+ contacts = contacts .loc [
496479 ~ np .isnan (contacts ["val" ]), ["X" , "Y" , "Z" , "feature_name" , "val" ]
497480 ]
498481 if not self ._use_thickness :
499482 contacts ["interface" ] = np .nan
500483 interface_val = 0
501484 for k in self ._stratigraphic_value ().keys ():
502485 contacts .loc [contacts ["name" ] == k , "interface" ] = interface_val
503- self . _contacts = contacts .loc [
486+ contacts = contacts .loc [
504487 ~ np .isnan (contacts ["interface" ]),
505488 ["X" , "Y" , "Z" , "feature_name" , "interface" ],
506489 ]
490+ return contacts
491+
492+ @contacts .setter
493+ def contacts (self , contacts ):
494+ """Function to convert input contact to loopstructural input
495+
496+ either uses the thickness values or assigns unique ids given
497+ the units named in stratigraphic order
498+
499+ Returns
500+ -------
501+ DataFrame
502+ data frame with x,y,y,val/interface,feature_name
503+ """
504+ if contacts is None :
505+ return
506+ self ._contacts = contacts .copy ()
507+ self ._update_feature_names (self ._contacts )
507508
508509 @property
509510 def contact_orientations (self ):
0 commit comments