Beispiel #1
0
    n = 1
    t0 = 0
    sigma = 1

    pdfs = []
    expn = []
    for i in range(x1, x2, dx):
        for j in range(y1, y2, dy):
            sx = array([i])
            sy = array([j])
            sz = array([3000])
            tps, tetas = psraytrace.raytracing(
                vp_ss103h, vs_ss103h, zlayer_ss103h, dg, sx, sy, sz, geox, geoy, geoz)
            tps = tps / dt

            opdf, expo = pspdf.pdftp(n, nt, tps, pickers, t0, sigma)
            pdfs.append(opdf)
            expn.append(expo)

    # pdfs = array(pdfs)
    expn = array(expn)
    expn = expn / max(abs(expn))
    pdfvalues = exp(expn)
    pdfvalues.shape = (nx, ny)

    # Save pdf in .txt file
    savetxt('pdf_961.txt', pdfvalues, fmt='%.18e')
    print("PDF calculation successfully completed[OK]")


# # Display pdf values
Beispiel #2
0
z1 = 1000
z2 = 3000
vel = 3000

ns = 512
srate = 0.25
win = 20
threshold = 600
N = 12
to = 0
pSigma = 1
pdf = np.zeros((10000, ), dtype=np.float32)
tp = np.zeros((geonum, ), dtype=np.int32)
tmp = np.zeros((geonum, ), dtype=np.int32)
ii = 0
jj = 0
for i in range(x1, x2, 5):
    for j in range(z1, z2, 20):
        for k in range(geonum):
            tp[k] = sqrt(square(i) + square(gz[k] - j)) / vel * 1000 / srate
            # print('%d'%tp[k])
            tmp[k] = merpicker(st.traces[k * 3].data, ns, srate, win,
                               threshold, "false")
            # print('%d'%tmp[k])
        n = ii * 100 + jj
        print('%d' % n)
        pdf[n] = pdftp(N, geonum, tp, tmp, to, pSigma)
        print('%100.99f' % pdf[n])
        jj = jj + 1
    ii = ii + 1
print(pdf)