コード例 #1
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()
コード例 #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()
コード例 #3
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()