修改了CzCore的runtype为I,会聚区间隔小于2000的合并

这个提交包含在:
2023-03-31 21:45:38 +08:00
父节点 ea2a7195a9
当前提交 35c10e68ed
+18 -5
查看文件
@@ -94,7 +94,7 @@ def call_Bellhop(freq, sd, rd, bathm, ssp, sed, base):
top = TopBndry(Opt_top)
bdy = Bndry(top, bottom)
# Beam params
run_type = 'C' # incoherently sum beams, see AT docs for more info
run_type = 'I' # incoherently sum beams, see AT docs for more info
nbeams = 0
alpha = np.linspace(-90, 90, 2) # min and max launch angle -20 degrees to 20 degrees
box = Box(Zmax, 100) # bound the region you let the beams go, depth in meters and range in km
@@ -198,7 +198,8 @@ def find_cvgcRays(rays_total):
def call_hjq(r, TL):
TL_R = 20 * np.log10(r)
out=[]
TL[np.isnan(TL)] = 0
TL_R[np.isnan(TL_R)] = 0
dTL = (TL_R - TL) * (TL <= TL_R)
dTL[np.isnan(dTL)] = 0
test_fliter_s = savgol_filter(dTL, 103, 3)
@@ -212,10 +213,10 @@ def call_hjq(r, TL):
czrangewidth_list = []
for i in range(r_3,len(test_fliter)):
czrangewidth = CzRangeWidth(0,0,0)
if(test_fliter[i]>=5):
if(test_fliter[i]>=3):
out.append(i)
if i+1<len(test_fliter):
if test_fliter[i+1]<5:
if test_fliter[i+1]<3:
m = r[out[0]]
n = r[out[len(out) - 1]]
l=n-m
@@ -241,8 +242,20 @@ def call_hjq(r, TL):
# plt.plot(r,dTL)
# plt.plot(r, test_fliter)
# plt.gca().invert_yaxis()
# plt.show()
czlen=len(czrangewidth_list)-1
if czlen>=1:
for i in range(1,czlen,1):
if czrangewidth_list[i].minRange-czrangewidth_list[i-1].maxRange<=2000:
czrangewidth_list[i].minRange = czrangewidth_list[i-1].minRange
czrangewidth_list[i].width=czrangewidth_list[i].maxRange-czrangewidth_list[i].minRange
czrangewidth_list[i - 1]=0
while czrangewidth_list.count(0) > 0:
for j in czrangewidth_list:
if j == 0:
czrangewidth_list.remove(j)
return czrangewidth_list