|
@@ -132,18 +132,32 @@ def main():
|
132
|
132
|
K0[0] = np.concatenate( (K0[0].T, K0[ik].T) ).T
|
133
|
133
|
K0 = K0[0]
|
134
|
134
|
#plt.matshow(K0)
|
|
135
|
+
|
|
136
|
+ ###################
|
|
137
|
+ # VERY Simple DOI #
|
|
138
|
+ maxq = np.argmax(K0, axis=1)
|
|
139
|
+ maxK = .1 * K0[ np.arange(0,len(ifaces)-1), maxq ] # 10% water is arbitrary
|
135
|
140
|
|
136
|
|
- # VERY Simple DOI
|
137
|
|
- SNR = np.sum(.01*K0, axis=1) / VS[0][0]
|
138
|
|
- SNR[SNR>1] = 1
|
139
|
|
- SNRidx = 0
|
140
|
|
- while SNR[SNRidx] >= 1:
|
141
|
|
- SNRidx += 1
|
142
|
|
- #print(SNR)
|
|
141
|
+ SNR = maxK / (VS[0][0])
|
|
142
|
+ #SNR[SNR>1] = 1
|
|
143
|
+ SNRidx = len(ifaces)-2
|
|
144
|
+ while SNR[SNRidx] < 1:
|
|
145
|
+ SNRidx -= 1
|
|
146
|
+
|
|
147
|
+ #print("IDX", SNRidx)
|
143
|
148
|
#plt.plot(ifaces[0:-1], SNR)
|
|
149
|
+ #plt.plot(ifaces[0:-1][SNRidx], SNR[SNRidx], '.',markersize=12)
|
144
|
150
|
#plt.gca().axhline(y=VS[0][0], xmin=0, xmax=ifaces[-1], color='r')
|
145
|
151
|
#plt.gca().axhline(y=1, xmin=0, xmax=ifaces[-1], color='r')
|
|
152
|
+ #K0T = np.dot(K0, K0.T)
|
|
153
|
+ #K0T = np.dot(K0, np.dot( VS[0][0]* np.eye(len(ifaces)-1,1), K0.T) )
|
|
154
|
+ #K0T = np.dot(K0, np.dot( 1/(VS[0][0]**2) * np.eye(np.shape(K0)[1]), K0.T) )
|
|
155
|
+ #plt.matshow(0.05 * np.sqrt(K0T))
|
|
156
|
+ #plt.colorbar()
|
|
157
|
+ #plt.plot(ifaces[0:-1], np.diag( 0.01* np.sqrt(K0T)))
|
|
158
|
+ #print(np.shape(K0T), len(ifaces)-1)
|
146
|
159
|
#plt.show()
|
|
160
|
+ #exit()
|
147
|
161
|
|
148
|
162
|
###############################################
|
149
|
163
|
# Build full kernel
|