放开距离采样间隔参数dr

这个提交包含在:
2023-04-10 21:19:30 +08:00
父节点 69b4a03d47
当前提交 4ff11a4b1a
共修改 5 个文件,包含 22 行新增和 34 行删除
+4 -4
查看文件
@@ -7,7 +7,7 @@ from ram import call_ram
import matplotlib.pyplot as plt
def call_tl(database, freq, sourceDepth, sourceLat, sourceLon,
receiveLat=None, receiveLon=None, range=None, azi=None, modelType='kraken', isPlot=False):
receiveLat=None, receiveLon=None, range=None, azi=None, dr=0.1, modelType='kraken', isPlot=False):
""" Input:
freq - float, Frequency
sourceDepth - float, Source depth
@@ -40,7 +40,7 @@ def call_tl(database, freq, sourceDepth, sourceLat, sourceLon,
return [], [], [], bathym
if modelType == 'bellhop':
sd = np.array([sourceDepth]) # Source depth
[Pos, TL] = call_Bellhop(freq, sd, bathym, ssp, sed, base)
[Pos, TL] = call_Bellhop(freq, sd, bathym, ssp, sed, base, dr)
# Plot
if isPlot:
plt.pcolor(Pos.r.range, Pos.r.depth, TL[0,0,:,:], vmin=40, vmax=130, cmap='jet_r', shading='auto')
@@ -52,7 +52,7 @@ def call_tl(database, freq, sourceDepth, sourceLat, sourceLon,
return Pos.r.range, Pos.r.depth, TL[0,0,:,:], bathym
elif modelType == 'kraken':
sd = np.array([sourceDepth]) # Source depth
[Pos, TL] = call_krakenc(freq, sd, bathym, ssp, sed, base)
[Pos, TL] = call_krakenc(freq, sd, bathym, ssp, sed, base, dr)
# Plot
if isPlot:
plt.pcolor(Pos.r.range, Pos.r.depth, TL[0,0,:,:], vmin=40, vmax=130, cmap='jet_r', shading='auto')
@@ -64,7 +64,7 @@ def call_tl(database, freq, sourceDepth, sourceLat, sourceLon,
return Pos.r.range, Pos.r.depth, TL[0,0,:,:], bathym
elif modelType == 'ram':
# 调用ram模块
[rd, rr, TL] = call_ram(freq, sourceDepth, bathym, ssp, sed)
[rd, rr, TL] = call_ram(freq, sourceDepth, bathym, ssp, sed, dr)
# Plot
if isPlot:
plt.pcolormesh(rr, rd, TL, vmin=60, vmax=130, cmap='jet_r', shading='auto')