Пример #1
0
    def __init__(self,
                 intervals=None,
                 components=None,
                 name='',
                 legend=None,
                 x_collar=0.,
                 y_collar=0.):
        """
        build a Borehole3D object from Striplog.Intervals list
        
        Parameters
        -----------
        intervals : list
            list of Striplog.Interval object (default = None)
            
        components : 
            (default = None)
        
        name : str 
        
        legend : Striplog Legend object (default = None)
        
        x_collar : float
            X coordinate of the borehole (default = 0)
            
        y_collar : float
            Y coordinate of the borehole (default = 0)
        """

        self.name = name

        if legend is None or not isinstance(legend, Legend):
            self.legend = Legend.default()
        else:
            self.legend = legend

        self.x_collar = x_collar
        self.y_collar = y_collar
        self.omf_legend, self.omf_cmap = striplog_legend_to_omf_legend(
            self.legend)

        if intervals is None:
            lexicon = Lexicon.default()
            with open(ROOT_DIR + '/data/test.las', 'r') as las3:
                default_intv = Striplog.from_las3(las3.read(), lexicon)
                intervals = list(default_intv)
            print("Pay attention that default intervals are actually used !\n")

        self.intervals = intervals
        self.geometry = []

        # instantiation with supers properties
        Striplog.__init__(self, list_of_Intervals=self.intervals)

        # self.uid=uuid #get a unique for identification of borehole in the project

        self.build_geometry()
Пример #2
0
 def __init__(self, list_of_Beds, metadata={}):
     """
     Parameters
     ----------
     list_of_Beds : list(``litholog.Bed``)
         A list containing the Bed(s) comprising the sequence.
     metadata : dict, optional
         Any additional metadata about the sequence as a whole.
     """
     self.metadata = metadata
     Striplog.__init__(self, list_of_Beds)