From 35c10e68ed34b889f0d97f82d146197a8403fbe2 Mon Sep 17 00:00:00 2001 From: shunli Date: Fri, 31 Mar 2023 21:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86CzCore=E7=9A=84runty?= =?UTF-8?q?pe=E4=B8=BAI=EF=BC=8C=E4=BC=9A=E8=81=9A=E5=8C=BA=E9=97=B4?= =?UTF-8?q?=E9=9A=94=E5=B0=8F=E4=BA=8E2000=E7=9A=84=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyat/czcore.py | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/pyat/czcore.py b/pyat/czcore.py index 5e66740..7c25cec 100644 --- a/pyat/czcore.py +++ b/pyat/czcore.py @@ -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=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