title: How to calculate polar derivatives with python?
body: <p>I have 2-dimensional arrays of cartesian data z = f(x,y). If I want a numerical derivative in x direction I do (with Python's numpy array)</p>
  
  <pre><code>lag = 10
  dx = (data[lag:,:] - data[:-lag,:])/float(lag)
  </code></pre>
  
  <p>Now, with the same data I have a center point and I want the derivative to be towards to this point i.e. radial derivative dr. And also I want the corresponding perpendicular component i.e. tangential derivative dt. </p>
  
  <p>Is there a function/library/block of code that does this? Like </p>
  
  <p><code>dr, dt = nablaPolar(data, centerpoint)?</code> </p>
  
  <p>Note that the mathematics have to be correct (the lag parameter depends on the distance to origin).</p>