parameters: (pnts, poly, density=1., openPoly=False, forceOpen=False)
return_statement: return density * 2.0 * G * gz, density * 2.0 * G * gzz
docstring: Calculate 2D gravimetric response at given points for a polygon.
  
      Calculate 2D gravimetric response at given points for a polygon with
      relative density change.
  
      pnts must be numbered clockwise. Else change the sign of the result.
      Return values are in mGal.
  
      Bei der magnetischen Loesung fehlt vermutlich ein 1/4.Pi im won & Bevis
      (oetvoes beziehung gl (9) ..... !!check this!!
docstring_summary: Calculate 2D gravimetric response at given points for a polygon.
docstring_tokens: Calculate 2D gravimetric response at given points for a polygon .
function: def calcPolyGz(pnts, poly, density=1., openPoly=False, forceOpen=False):
      """Calculate 2D gravimetric response at given points for a polygon.
  
      Calculate 2D gravimetric response at given points for a polygon with
      relative density change.
  
      pnts must be numbered clockwise. Else change the sign of the result.
      Return values are in mGal.
  
      Bei der magnetischen Loesung fehlt vermutlich ein 1/4.Pi im won & Bevis
      (oetvoes beziehung gl (9) ..... !!check this!!
      """
      qpnts = pnts
      N = len(pnts)
  
      if np.size(pnts[0]) == 1:
          qpnts = list(zip(pnts, np.zeros(N)))
  
      if not forceOpen:
          if np.linalg.norm(poly[0] - poly[-1], 2) < 1e-8:
              openPoly = True
  
      gz = np.zeros((N, 3))
      gzz = np.zeros((N, 3))
  
      for i, p in enumerate(qpnts):
          for j in range(len(poly) - (openPoly)):
              a = poly[j]
              b = poly[(j + 1) % len(poly)]
          #    print "a, b", a, b
              gzi, gzzi = lineIntegralZ_WonBevis(a - p, b - p)
  
  #            print(gzi, gzzi)
              gz[i, :] += gzi * [1.0, 1.0, 1.0]
              gzz[i, :] += gzzi
  
      return density * 2.0 * G * gz, density * 2.0 * G * gzz
function_tokens: def calcPolyGz ( pnts , poly , density = 1. , openPoly = False , forceOpen = False ) : qpnts = pnts N = len ( pnts ) if np . size ( pnts [ 0 ] ) == 1 : qpnts = list ( zip ( pnts , np . zeros ( N ) ) ) if not forceOpen : if np . linalg . norm ( poly [ 0 ] - poly [ - 1 ] , 2 ) < 1e-8 : openPoly = True gz = np . zeros ( ( N , 3 ) ) gzz = np . zeros ( ( N , 3 ) ) for i , p in enumerate ( qpnts ) : for j in range ( len ( poly ) - ( openPoly ) ) : a = poly [ j ] b = poly [ ( j + 1 ) % len ( poly ) ] #    print "a, b", a, b gzi , gzzi = lineIntegralZ_WonBevis ( a - p , b - p ) #            print(gzi, gzzi) gz [ i , : ] += gzi * [ 1.0 , 1.0 , 1.0 ] gzz [ i , : ] += gzzi return density * 2.0 * G * gz , density * 2.0 * G * gzz