def main():
    fig, ax = plt.subplots()
    ax.set_xlabel('Eastward Slip (m)')
    ax.set_ylabel('Northward Slip (m)')

    offsets = [[0, 0]]
    heaves = [[0,0,0]]

    for hor, name in zip(data.horizons[::-1], data.gulick_names[::-1]):
        results = get_result(hor.name)
        discarded = 200 - results.shape[0]
        print 'Discarded {} points from {}'.format(discarded, hor.name)

        # Plot covariance ellipse...
        dx, dy, slip = plot(ax, results, '# ' + name)
        offsets.append([dx, dy])
        heaves.append(utilities.calculate_heave([dx, dy], hor))


    # Plot plate motion over 200kyr
    utilities.plot_plate_motion(xy=offsets[3], time=2e5)

    # Plot lines connecting the horizons...
    ax.plot(*zip(*offsets), marker='o', color='darkred')

    # Plot heaves...
    heaves = np.array(heaves)
    ax.plot(*heaves[:,:2].T, marker='o', color='green')
    
    # Set aspect ratio of plot to 1 so that azimuths are properly represented
    ax.axis('equal')

    plt.show()
Exemple #2
0
def main():
    fig, ax = plt.subplots()
    ax.set_xlabel('Eastward Slip (m)')
    ax.set_ylabel('Northward Slip (m)')

    offsets = [[0, 0]]
    heaves = [[0, 0, 0]]

    for hor, name in zip(data.horizons[::-1], data.gulick_names[::-1]):
        results = get_result(hor.name)
        discarded = 200 - results.shape[0]
        print 'Discarded {} points from {}'.format(discarded, hor.name)

        # Plot covariance ellipse...
        dx, dy, slip = plot(ax, results, '# ' + name)
        offsets.append([dx, dy])
        heaves.append(utilities.calculate_heave([dx, dy], hor))

    # Plot plate motion over 200kyr
    utilities.plot_plate_motion(xy=offsets[3], time=2e5)

    # Plot lines connecting the horizons...
    ax.plot(*zip(*offsets), marker='o', color='darkred')

    # Plot heaves...
    heaves = np.array(heaves)
    ax.plot(*heaves[:, :2].T, marker='o', color='green')

    # Set aspect ratio of plot to 1 so that azimuths are properly represented
    ax.axis('equal')

    plt.show()
Exemple #3
0
def plot_restored_locations(slips, heaves):
    """Plot the map-view location of each horizon's restored position."""
    # Prepend the present-day location of 0,0 for plotting...
    slips = [(0, 0)] + slips
    heaves = [(0, 0, 0)] + heaves

    slip_x, slip_y = np.array(slips).T

    heave_x, heave_y, heave_z = np.array(heaves).T

    fig, ax = plt.subplots()
    ax.plot(slip_x, slip_y, 'bo-')
    ax.plot(heave_x, heave_y, 'go-')
    utilities.plot_plate_motion(time=2e5, xy=slips[3])

    plt.axis('equal')

    return fig, ax
def plot_restored_locations(slips, heaves):
    """Plot the map-view location of each horizon's restored position."""
    # Prepend the present-day location of 0,0 for plotting...
    slips = [(0,0)] + slips
    heaves = [(0,0,0)] + heaves

    slip_x, slip_y = np.array(slips).T

    heave_x, heave_y, heave_z = np.array(heaves).T


    fig, ax = plt.subplots()
    ax.plot(slip_x, slip_y, 'bo-')
    ax.plot(heave_x, heave_y, 'go-')
    utilities.plot_plate_motion(time=2e5, xy=slips[3])

    plt.axis('equal')

    return fig, ax
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')
plt.show()
Exemple #6
0
for i, hor in enumerate(data.horizons[::-1]):
    print hor.name
    xyz = data.to_xyz(hor)[::50]
    xyz = data.to_world(xyz)

    slip, metric = invert_slip(fault, xyz, alpha=data.alpha, guess=guess, 
                               overlap_thresh=1, return_metric=True)
    heave = utilities.calculate_heave(slip, hor)

    variances.append(metric)
    planar_var = planar_variance(xyz)
    planar_variances.append(planar_var)
    print metric / planar_var

    slips.append(slip)
    heaves.append(heave)


x, y = np.array(slips).T
plt.plot(x, y, 'bo-')

x, y, z = np.array(heaves).T
plt.plot(x, y, 'go-')


utilities.plot_plate_motion(time=2e5, xy=slips[3])

plt.axis('equal')

plt.show()
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')
plt.show()