def load_data(): top = geoprobe.horizon('data/seismic/Horizons/seafloor.hzn') base = geoprobe.horizon('data/seismic/Horizons/channels.hzn') vol = geoprobe.volume('data/seismic/Volumes/example.vol') coh = geoprobe.volume('data/seismic/Volumes/coherence.vol') vol.data = vol.load() coh.data = coh.load() base = smooth_horizon(base) top = smooth_horizon(top) return vol, coh, base, top
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 __init__(self, *args, **kwargs): volname = kwargs.pop('volname', self.default_volume) GdalGrid.__init__(self, *args, **kwargs) self.vol = geoprobe.volume(volname) self.inproj = osr.SpatialReference() self.inproj.ImportFromEPSG(self.proj_number) self.outproj = osr.SpatialReference(self.ds.GetProjection())
def load_data(): top = geoprobe.horizon('data/seismic/Horizons/channels.hzn') vol = geoprobe.volume('data/seismic/Volumes/example.vol') vol.data = vol.load() top = smooth_horizon(top) return vol, top
def triangles(fault, vol): if isinstance(fault, basestring): fault = geoprobe.swfault(fault) if isinstance(vol, basestring): vol = geoprobe.volume(vol) geo_xyz = georef_xyz(fault, vol) mask = inside_outline(fault) return geo_xyz[fault.tri.triangle_nodes[mask]]
def main(): # Path to the example data dir relative to the location of this script. # This is just so that the script can be called from a different directory datadir = os.path.join(os.path.dirname(__file__), 'data') # Read an existing geoprobe volume vol = geoprobe.volume(os.path.join(datadir, 'Volumes', 'example.vol')) # Print some info print_info(vol) # Example plots plot(vol)
def main(): # Path to the example data dir relative to the location of this script. # This is just so that the script can be called from a different directory datadir = os.path.dirname(__file__) + '/data/' # Read an existing geoprobe volume vol = geoprobe.volume(datadir + 'Volumes/example.vol') # Print some info print_info(vol) # Example plots plot(vol)
def setup_method(self, method): self.basedir = os.path.dirname(geoprobe.__file__) self.datadir = os.path.join(self.basedir, '..', 'examples', 'data') volname = os.path.join(self.datadir, 'Volumes', 'example.vol') self.vol = geoprobe.volume(volname)
import os import geoprobe import numpy as np basedir = os.path.dirname(__file__) basedir = os.path.join(basedir, 'data') faultname = os.path.join(basedir, 'swFaults', 'jdk_oos_splay_large_area_depth-mod.swf') fault = geoprobe.swfault(faultname) volname = os.path.join(basedir, 'Volumes', 'example.hdf') vol = geoprobe.volume(volname) # These are in stratigraphic order from oldest to youngest horizon_names = [ 'jdk_forearc_horizon_7.hzn', 'jdk_forearc_horizon_6.hzn', 'jdk_forearc_horizon_5.hzn', 'jdk_forearc_horizon_4.hzn', 'jdk_forearc_horizon_3.5.hzn', 'jdk_forearc_horizon_3.hzn', 'jdk_forearc_horizon_2.5.hzn', 'jdk_forearc_horizon_2.hzn', 'jdk_forearc_horizon_1.5.hzn', 'jdk_forearc_horizon_1.hzn', ] horizon_names = [os.path.join(basedir, 'Horizons', item) for item in horizon_names] horizons = [geoprobe.horizon(item) for item in horizon_names]
import os import geoprobe import numpy as np basedir = os.path.dirname(__file__) basedir = os.path.join(basedir, 'data') faultname = os.path.join(basedir, 'swFaults', 'jdk_oos_splay_large_area_depth-mod.swf') fault = geoprobe.swfault(faultname) volname = os.path.join(basedir, 'Volumes', 'example.hdf') vol = geoprobe.volume(volname) # These are in stratigraphic order from oldest to youngest horizon_names = [ 'jdk_forearc_horizon_7.hzn', 'jdk_forearc_horizon_6.hzn', 'jdk_forearc_horizon_5.hzn', 'jdk_forearc_horizon_4.hzn', 'jdk_forearc_horizon_3.5.hzn', 'jdk_forearc_horizon_3.hzn', 'jdk_forearc_horizon_2.5.hzn', 'jdk_forearc_horizon_2.hzn', 'jdk_forearc_horizon_1.5.hzn', 'jdk_forearc_horizon_1.hzn', ] horizon_names = [ os.path.join(basedir, 'Horizons', item) for item in horizon_names
Provides convenient access to all faults used for inversion. These are only the recent faults within the piggyback basin. Faults outside of the piggyback basin may have been rotated since their formation and are not used. Major faults (e.g. the large, right-lateral strike slip faults at the western side of the basin) are not used, as their orientation may not reflect the recent stress state. """ import os from glob import iglob import geoprobe DATADIR = os.path.join(os.path.dirname(__file__), 'data') BASENAME = os.path.join(DATADIR, 'swFaults', 'jdk_piggyback') vol = geoprobe.volume(os.path.join(DATADIR, 'Volumes', 'example.hdf')) def all_normal_faults(): """All normal faults in the piggyback basin.""" for filename in iglob(BASENAME + '*normal*'): yield geoprobe.swfault(filename) def main_normal_faults(): """Main normal fault population in the piggyback basin.""" for filename in iglob(BASENAME + '*normal*'): if 'perp' not in filename: yield geoprobe.swfault(filename) def sec_normal_faults(): """Secondary normal fault population in the piggyback basin.""" for filename in iglob(BASENAME + '*normal*'):
from mayavi import mlab import numpy as np import geoprobe import scipy.ndimage hor = geoprobe.horizon('data/seismic/Horizons/channels.hzn') vol = geoprobe.volume('data/seismic/Volumes/example.vol') data = vol.load() # Because we're not working in inline/crossline, convert to "pixel" coords. z = hor.grid z = vol.model2index(z, axis='z', int_conversion=False) # Clip out some spikes and smooth the surface a bit... z = scipy.ndimage.median_filter(z, 4) z = scipy.ndimage.gaussian_filter(z, 1) # Quirks due to the way hor.grid is defined... mlab.surf(np.arange(z.shape[0]), np.arange(z.shape[1]), -z.T, colormap='gist_earth') source = mlab.pipeline.scalar_field(data) source.spacing = [1, 1, -1] for axis in ['x', 'y']: plane = mlab.pipeline.image_plane_widget(source, plane_orientation='{}_axes'.format(axis), slice_index=100, colormap='gray') plane.module_manager.scalar_lut_manager.reverse_lut = True mlab.show()