def smPhiDP(phiDP, ran):
# smooth phiDP field and take derivative
# calculate lanczos filter weights
numRan = ran.shape[0]
numK = 31
fc = 0.015
kt = np.linspace(-(numK-1)/2, (numK-1)/2, numK)
w = np.sinc(2.*kt*fc)*(2.*fc)*np.sinc(kt/(numK/2))
#smoothPhiDP = convolve1d(phiDP, w, axis=1, mode='constant', cval=-999.)
smoothPhiDP = conv(phiDP, w)
#smoothPhiDP = np.ma.masked_where(smoothPhiDP==-999., smoothPhiDP)
return smoothPhiDP
# function for estimating kdp
#----------------------------------
评论列表
文章目录