简体   繁体   English

从非结构化点到非结构化点的2D插值

[英]2D Interpolation from unstructured points to unstructured points

I'm stuck at this things for last couple of days. 最近几天我一直在做这件事。 I have two sets of unstructured data. 我有两组非结构化数据。 First set of data has only 9583 points and second one has 60000 points. 第一组数据只有9583点,第二组数据有60000点。 I need to interpolate a particular field of first set data(x1[len = 9583], y1[len = 9583], temperature1[len = 9583]) to second set of data (x2[len = 60000], y2[len = 60000], temperature2[len = 60000]). 我需要将第一组数据的特定字段(x1 [len = 9583],y1 [len = 9583],temperature1 [len = 9583])插值到第二组数据(x2 [len = 60000],y2 [len = 60000],温度2 [len = 60000])。 I have tried with python "SmoothBivariateSpline" and looked for other options. 我尝试使用python“ SmoothBivariateSpline”并寻找其他选项。 But I did not find any reasonable solutions. 但是我没有找到任何合理的解决方案。 I'm open for either python or c++ . 我对python或c ++开放。 It would be highly appreciable if anybody can help me figuring out the solution. 如果有人可以帮助我找出解决方案,那将是非常有意义的。 I attached the figure for your convenience Figure shows two sets of unstructured 为了方便起见,我附上了该图。该图显示了两组非结构化的图。

There's a bunch on SO on unstructured interpolation, including: 非结构化插值上有很多关于SO的内容,包括:

  1. Python/Scipy 2D Interpolation (Non-uniform Data) Python / Scipy 2D插值(非均匀数据)
  2. What to do if I want 3D spline/smooth interpolation of random unstructured data? 如果我想对随机非结构化数据进行3D样条/平滑插值怎么办?
  3. 3D interpolation of 2 lists in python Python中2个列表的3D插值

And of course, there's always the SciPy Interpolation Documentation 当然,总会有SciPy插值文档

Contrary to the title of your question, your data looks more like what Numpy calls "1D data" (that is XY data) rather than "2D data" (XYZ data). 与问题的标题相反,您的数据看起来更像Numpy所说的“ 1D数据”(即XY数据),而不是“ 2D数据”(XYZ数据)。 It also looks like your data is mostly sampling & noise, rather than fit to some mathematical function. 看起来您的数据主要是采样和噪声,而不是适合某些数学函数。 So, I'd suggest starting at the top of the list from the SciPy Docs , skipping over the univariate and multivariate stuff and trying something in the 1-D Splines section, perhaps Scipy.interpolate.BSpline . 因此,我建议从SciPy Docs列表的顶部开始,跳过单变量和多变量的内容,并尝试在1-D Splines部分中尝试一些操作,也许是Scipy.interpolate.BSpline

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM