def __init__(self, vol, colormap, ve=2.0, horizons=None, horizon_styles=None, 
                 wells=None, well_marker_style=None, section_line_style=None, 
                 well_annotation_style=None, well_threshold=5, name='', 
                 resample_factor=2):
        # If horizon_styles is just a single dict, pass in a list of it
        if isinstance(horizon_styles, dict):
            horizon_styles = [horizon_styles]
        if horizons is not None:
            horizons = HorizonSet(horizons, horizon_styles)

        if well_marker_style is None:
            well_marker_style = dict(marker='o', ls='none', 
                                   color='green', markersize=10)
        if section_line_style is None:
            section_line_style = dict(marker='o')
        if well_annotation_style is None:
            well_annotation_style = dict(xytext=(0, 10), ha='center',
                                       textcoords='offset points')

        self.section_line_style = section_line_style
        self.well_marker_style = well_marker_style
        self.well_annotation_style = well_annotation_style
        self.wells = WellSet(wells, well_threshold)
        self.ve = ve
        self.name = name
        self.resample_factor = resample_factor
        self.vol = geoprobe.volume(vol)
        self.colormap = geoprobe.colormap(colormap)
        self.horizons = horizons
        self.sections = []
        self.maps = []
Beispiel #2
0
    def __init__(self,
                 vol,
                 colormap,
                 ve=2.0,
                 horizons=None,
                 horizon_styles=None,
                 wells=None,
                 well_marker_style=None,
                 section_line_style=None,
                 well_annotation_style=None,
                 well_threshold=5,
                 name='',
                 resample_factor=2):
        # If horizon_styles is just a single dict, pass in a list of it
        if isinstance(horizon_styles, dict):
            horizon_styles = [horizon_styles]
        if horizons is not None:
            horizons = HorizonSet(horizons, horizon_styles)

        if well_marker_style is None:
            well_marker_style = dict(marker='o',
                                     ls='none',
                                     color='green',
                                     markersize=10)
        if section_line_style is None:
            section_line_style = dict(marker='o')
        if well_annotation_style is None:
            well_annotation_style = dict(xytext=(0, 10),
                                         ha='center',
                                         textcoords='offset points')

        self.section_line_style = section_line_style
        self.well_marker_style = well_marker_style
        self.well_annotation_style = well_annotation_style
        self.wells = WellSet(wells, well_threshold)
        self.ve = ve
        self.name = name
        self.resample_factor = resample_factor
        self.vol = geoprobe.volume(vol)
        self.colormap = geoprobe.colormap(colormap)
        self.horizons = horizons
        self.sections = []
        self.maps = []
def build_side(vol, sl, x, y, z, zbase=None):
    data = vol.data
    full = sl
    sl = sl[:2]
    z0, x0, y0 = z[sl], x[sl], y[sl]

    if zbase is None:
        base = -np.arange(data.shape[2])[full[-1]].max()
        base = base * np.ones_like(z0)
    else:
        base = zbase[sl]

    z0 = np.vstack([z0, base])
    x0 = np.vstack([x0, x0])
    y0 = np.vstack([y0, y0])
    mesh = mlab.mesh(x0, y0, z0)

    sl = slice(-z0.max(), -z0.min(), full[-1].step)
    full = tuple([full[0], full[1], sl])
    dat = data[full].T

    cmap = geoprobe.colormap('data/seismic/Colormaps/brown_black').as_matplotlib
    texture(mesh, dat, cmap)
    return mesh