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