I have measurements of a quantity on a 3d grid. My measurements are distributed on four x-y planes similar to what is shown in the image below. The measurements roughly follow a Cartesian grid but have varying spacing and gaps. The measurements are more sparse in the z-direction but I expect the quantity to vary by an order of magnitude more in the x and y direction.

The whole domain is not convex but for now I will concentrate only on the subset of data points where the measurement planes overlap.

data positions

I am interested in linearly interpolating the quantity in 3D (in the x-y region where the measurement planes overlap), integrating the quantities over all space, and determining gradients in each direction.

I am aware of trilinear interpolation along a cartesian grid (e.g. scipy.interpolate.RegularGridInterpolator) and barycentric interpolation with Delaunay triangulation (e.g. scipy.interpolate.LinearNDInterpolator). Is there an advantage to choosing one method over another? I also found a gradient calculation in matplotlib.tri.TriInterpolator.gradient. Is this a good choice?

  • $\begingroup$ Is your domain convex? It does not seem so in your image. $\endgroup$
    – nicoguaro
    Jul 16 '16 at 0:02
  • 1
    $\begingroup$ Alternatively, you can try kriging. See Connor Johnson's example and the pyKriging package. $\endgroup$ Jul 16 '16 at 0:22
  • $\begingroup$ @nicoguaro I updated the question that for now I only want to concentrate on the subset of points where the planes overlap. $\endgroup$
    – jensv
    Jul 16 '16 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.