# Interpolation function error: The quality of the underlying mesh is too low

Consider a dataset BplustoPiXlight.dat (alternative link).

I import it and try to interpolate:

SetDirectory[NotebookDirectory[]];
DataTable=Import["BplustoPiXlight.dat","Data"]


However, Mathematica gives me the following error:

Interpolation::femimq: The element mesh has insufficient quality of -9.94174*10^-16. A quality estimate below 0. may be caused by a wrong ordering of element incidents or self-intersecting elements.

Interpolation::fememtlq: The quality -9.94174*10^-16 of the underlying mesh is too low. The quality needs to be larger than 0..

I tried first to rescale the data

DataDistr=Interpolation[{#[[1]], #[[2]], 10^20 #[[3]], 10^20 #[[4]]} & /@DataTable,InterpolationOrder->1]


However, it did not work (maybe since the "quality" is negative)... Could you please tell me how to resolve the issue?

Edit. It seems that I have found the solution. I just rescaled the first two rows by huge numbers.

Just an extended comment.

If I look at the datapoints

p3D=DataTable[[All, {1, 2, 3}]];
ListPointPlot3D[p3D,PlotStyle -> PointSize[.001]]
(*sorry couldn't upload the plot *)


I see some slices of dence pointgrids, with strongly differing gridtopology. This might be the reason why Interpolate doesn't succeed.

Meshing of these points

DelaunayMesh[p3D]


creates a MeshRegion without error but didn't show it!

• The real question is if ToElementMesh gives messages (and it will) because that is what is used in InterpolatingFunction – user21 Jun 19 '19 at 5:18