Ejemplo n.º 1
0
def benchmarkfunc(mode):
    nx = 1
    if (mode == 'python'):
        R = Migrate(data, nx, dx, nz, dz, dt, dcdp, 3000, offsets, nsmp, ntrc,
                    noff, 1)
    if (mode == 'cython'):
        R = mod_cyMigrate.cyMigrate(data, nx, dx, nz, dz, dt, dcdp, 3000,
                                    offsets, nsmp, ntrc, noff, 1)
Ejemplo n.º 2
0
def full_migration(data):
    nx = ntrc
    V = 2950

    R = np.zeros((noff,nx, nz))
    for ioff in range(noff):            # each offset in its own layer
        R[ioff,:,:] = mod_cyMigrate.cyMigrate(data,nx,dx,nz,dz,dt,dcdp,V,offsets,nsmp,ntrc,noff,ioff)
    return R
Ejemplo n.º 3
0
def v_analysis2(data, h1, h2, v):
    nx = 1

    off1 = mod_cyMigrate.cyMigrate(data, nx, dx, nz, dz, dt, dcdp, v, offsets,
                                   nsmp, ntrc, noff, h1)
    off2 = mod_cyMigrate.cyMigrate(data, nx, dx, nz, dz, dt, dcdp, v, offsets,
                                   nsmp, ntrc, noff, h2)

    zm1 = np.argmax(off1) * dz
    zm2 = np.argmax(off2) * dz

    h12 = (offsets[h1] / 2)**2
    h22 = (offsets[h2] / 2)**2

    print zm1, zm2, h12, h22

    v0 = v * (np.sqrt((zm1**2 - zm2**2) / (h12 - h22) + 1))**-1

    return (v0)
def full_migration(data):
    nx = ntrc
    V = 2950

    R = np.zeros((noff, nx, nz))
    for ioff in range(noff):  # each offset in its own layer
        R[ioff, :, :] = mod_cyMigrate.cyMigrate(data, nx, dx, nz, dz, dt, dcdp,
                                                V, offsets, nsmp, ntrc, noff,
                                                ioff)
    return R
Ejemplo n.º 5
0
def v_analysis2(data,h1,h2,v):
    nx=1

    off1 = mod_cyMigrate.cyMigrate(data,nx,dx,nz,dz,dt,dcdp,v,offsets,nsmp,ntrc,noff,h1)
    off2 = mod_cyMigrate.cyMigrate(data,nx,dx,nz,dz,dt,dcdp,v,offsets,nsmp,ntrc,noff,h2)


    zm1 = np.argmax(off1)*dz
    zm2 = np.argmax(off2)*dz


    h12 = (offsets[h1]/2)**2
    h22 = (offsets[h2]/2)**2

    print(zm1,zm2,h12,h22)

    v0 = v * (np.sqrt((zm1**2 - zm2**2)/(h12-h22) +1 ))**-1


    return(v0)
Ejemplo n.º 6
0
def v_analysis(vmin, vmax):
    '''
    Velocity analysis due to testing a range of velocities (from vmin to vmax)
    plotting them together in one plot.
    '''

    nvels = 100                         # number of velocities to be tested
    V = np.linspace(vmin,vmax,nvels)
    nx=1                                # only compute one trace
    M = np.zeros((nz, nvels))
    for n in range(0, len(V)-1):
        R = mod_cyMigrate.cyMigrate(data,nx,dx,nz,dz,dt,dcdp,V[n],offsets,nsmp,ntrc,noff,1)
        M[:,n] = R[0,:]

    plt.figure()
    imgplot = plt.imshow(M, extent=[vmin, vmax, nz*dz, dz])
    plt.ylabel('Depth in [m]')
    plt.xlabel('Velocity in [m/s]')
    plt.savefig('./figures/v_analysis.eps', bbox_inches=0)
    plt.show()

    return M
Ejemplo n.º 7
0
def v_analysis(vmin, vmax):
    '''
    Velocity analysis due to testing a range of velocities (from vmin to vmax)
    plotting them together in one plot.
    '''

    nvels = 100  # number of velocities to be tested
    V = np.linspace(vmin, vmax, nvels)
    nx = 1  # only compute one trace
    M = np.zeros((nz, nvels))
    for n in xrange(0, len(V) - 1):
        R = mod_cyMigrate.cyMigrate(data, nx, dx, nz, dz, dt, dcdp, V[n],
                                    offsets, nsmp, ntrc, noff, 1)
        M[:, n] = R[0, :]

    plt.figure()
    imgplot = plt.imshow(M, extent=[vmin, vmax, nz * dz, dz])
    plt.ylabel('Depth in [m]')
    plt.xlabel('Velocity in [m/s]')
    plt.savefig('./figures/v_analysis.eps', bbox_inches=0)
    plt.show()

    return M
Ejemplo n.º 8
0
def benchmarkfunc(mode):
    nx=1
    if (mode == 'python'):
        R = Migrate(data,nx,dx,nz,dz,dt,dcdp,3000,offsets,nsmp,ntrc,noff,1)
    if (mode == 'cython'):
        R = mod_cyMigrate.cyMigrate(data,nx,dx,nz,dz,dt,dcdp,3000,offsets,nsmp,ntrc,noff,1)