def get_Surface_Potentials(survey, src,field_obj):
phi = field_obj['phi']
CCLoc = mesh.gridCC
zsurfaceLoc = np.max(CCLoc[:,1])
surfaceInd = np.where(CCLoc[:,1] == zsurfaceLoc)
xSurface = CCLoc[surfaceInd,0].T
phiSurface = phi[surfaceInd]
phiScale = 0.
if(survey == "Pole-Dipole" or survey == "Pole-Pole"):
refInd = Utils.closestPoints(mesh, [xmax+60.,0.], gridLoc='CC')
# refPoint = CCLoc[refInd]
# refSurfaceInd = np.where(xSurface == refPoint[0])
# phiScale = np.median(phiSurface)
phiScale = phi[refInd]
phiSurface = phiSurface - phiScale
return xSurface,phiSurface,phiScale
# Inline functions for computing apparent resistivity
#eps = 1e-9 #to stabilize division
#G = lambda A, B, M, N: 1. / ( 1./(np.abs(A-M)+eps) - 1./(np.abs(M-B)+eps) - 1./(np.abs(N-A)+eps) + 1./(np.abs(N-B)+eps) )
#rho_a = lambda VM,VN, A,B,M,N: (VM-VN)*2.*np.pi*G(A,B,M,N)
评论列表
文章目录