如何对矩阵进行网格化

时间:2018-08-23 11:09:37

标签: python python-3.x

我已经创建了一个9500 x 300000矩阵,并希望知道是否有一种将其网格化的方法,因为我不确定矩阵是否已经网格化。这实际上是地震处理的速度矩阵。我是python的新手,如果不是技术人员,请编程。

mat_vel = np.ones((9500, 306240))
for shotpoint in range(306240): #total shotpoint extracted from the seismic data
    count6 = 0
    count7 = 0
    count1 = 0 # count for totaltime in sesimc data
    count2 = 0
    count3 = 0
    count4 = 0
    totaltime = [0]
    modelvel = [1500]
    vel = 1500
    while totaltime[count1] <= 19.0:
        mat_vel[count6][count8] *= modelvel[count7]
        num = totaltime[count1] + 0.002
        totaltime.append(num)
        modelvel.append(vel)
        count1 += 1
        count6 += 1
        count7 += 1
        if totaltime[count1] >= depth_time[count5] and totaltime[count1] <= (depth_time[count5] + (2*2000/1500)):
            vel = vel1(1)[count2]
            count2 += 1
        elif totaltime[count1] >= (depth_time[count5] + (2*2000/1500))  and totaltime[count1] <= (depth_time[count5] + (2*2000/1500) + (2*4000/1500)):
            vel = vel2(2)[count3]
            count3 += 1

以上是我的代码的一部分,我使用了一个numpy数组。我只是想知道是否需要对速度矩阵进行网格化处理才能在SU这样的地震处理软件中使用它

0 个答案:

没有答案