def update_plot(self):
     if self.plot is None:
         self.plot = self.setup_plot()
     azi = np.radians(90 - self.azimuth)
     dx, dy = self.slip * np.cos(azi), self.slip * np.sin(azi)
     dx, dy = 1000 * dx, 1000 * dy
     moved = inclined_shear(self.faultxyz, self.horxyz, (dx, dy), self.alpha,
                            remove_invalid=False)
     x, y, z = moved.T
     z *= self.ve
     self.plot.mlab_source.set(x=x, y=y, z=z, scalars=z)
def plot_horizons(ax, horizons, slip=(0, 0)):
    fault = data.world_xyz(data.fault)
    sec = Section()

    ax.set_ylim([-8, -1.5])
    for hor in horizons:
        xyz = data.world_xyz(hor)[::100]
        xyz = inclined_shear(fault, xyz, slip, data.alpha)
        sec.plot(xyz, ax)

    sec.plot(fault, ax, color='red')
    plt.setp(ax.get_xticklabels(), visible=False)
def plot_horizons(ax, horizons, slip=(0,0)):
    fault = data.world_xyz(data.fault)
    sec = Section()

    ax.set_ylim([-8, -1.5])
    for hor in horizons:
        xyz = data.world_xyz(hor)[::100]
        xyz = inclined_shear(fault, xyz, slip, data.alpha)
        sec.plot(xyz, ax)

    sec.plot(fault, ax, color='red')
    plt.setp(ax.get_xticklabels(), visible=False)
 def update_plot(self):
     if self.plot is None:
         self.plot = self.setup_plot()
     azi = np.radians(90 - self.azimuth)
     dx, dy = self.slip * np.cos(azi), self.slip * np.sin(azi)
     dx, dy = 1000 * dx, 1000 * dy
     moved = inclined_shear(self.faultxyz,
                            self.horxyz, (dx, dy),
                            self.alpha,
                            remove_invalid=False)
     x, y, z = moved.T
     z *= self.ve
     self.plot.mlab_source.set(x=x, y=y, z=z, scalars=z)
fault = data.to_world(fault)

models = [[0, 0]]

i = 0
for hor in data.horizons[::-1]:
    print hor.name
    # Downsample horizon for faster solution...
    xyz = data.to_xyz(hor)[::50,:]
    xyz = data.to_world(xyz)

    # Move this horizon to the last horizon's best fit offset.
    # Following the path of all previous horizons...
    for model in models:
        dx, dy = model
        xyz = inclined_shear(fault, xyz, (dx,dy), data.alpha)

    model = invert_slip(fault, xyz, data.alpha, guess=(0,0))
    models.append(model)
    i += 1

models = np.array(models)
movement = models[:,:2].cumsum(axis=0)

x, y = movement.T

plt.plot(x, y, marker='o')

utilities.plot_plate_motion(time=3e5)

plt.axis('equal')
예제 #6
0
import geoprobe
import data
import utilities

from fault_kinematics import homogeneous_simple_shear

from process_bootstrap_results import get_result, load

fault = data.to_world(data.to_xyz(data.fault))
alpha = data.alpha

f, group = load()

for hor in data.horizons:
    print hor.name
    xyz = data.to_world(data.to_xyz(hor))

    slip = get_result(hor.name, group)

    restored = homogeneous_simple_shear.inclined_shear(fault, xyz, slip, alpha)

    print 'Resampling...'
    restored = data.to_model(restored)
    restored = utilities.grid_xyz(restored)
    new_hor = geoprobe.horizon(*restored.T)
    new_hor.write('restored_horizons/' + hor.name + '.hzn')

f.close()

fault = data.to_world(fault)

models = [[0, 0]]

i = 0
for hor in data.horizons[::-1]:
    print hor.name
    # Downsample horizon for faster solution...
    xyz = data.to_xyz(hor)[::50, :]
    xyz = data.to_world(xyz)

    # Move this horizon to the last horizon's best fit offset.
    # Following the path of all previous horizons...
    for model in models:
        dx, dy = model
        xyz = inclined_shear(fault, xyz, (dx, dy), data.alpha)

    model = invert_slip(fault, xyz, data.alpha, guess=(0, 0))
    models.append(model)
    i += 1

models = np.array(models)
movement = models[:, :2].cumsum(axis=0)

x, y = movement.T

plt.plot(x, y, marker='o')

utilities.plot_plate_motion(time=3e5)

plt.axis('equal')