question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve interpolation of fields at receiver positions.

See original GitHub issue

Currently, the field at receiver positions is interpolated linearly. This can lead to quite large errors as we cover many orders of magnitude in EM; the problem is particularly pronounced with stretched grids. Here an example in 2D, but it applies equally for 3D:

InterpolationComparison

This shows a dipole in a homogeneous fullspace, calculated with analytical solutions (hence no modelling errors); once it is calculated on a fine 5m x 5m grid (data shown on the left); and once on a stretched grid with stretching factor 1.1, having cell widths starting at 0.6 m up to 243 m. The middle figure shows the error if interpolated linearly, the right figure if interpolated with a cubic spline. Everything red means a relative error > 1%, hence not acceptable. Dark red is a relative error of 100% and more. (Notebook.)

There are various potential approaches for this, e.g.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
banesullivancommented, Jun 13, 2019

I’m running low on time to experiment with this - but it’s on my list!

I’m thinking this will be totally doable with VTK via PyVista, however the implementation will likely be as follows:

There will be an input dataset (the fine mesh) and a source dataset (the coarse mesh with data). Then the input dataset (triangular, octree, rectilinear, or whatever) will have a uniform mesh of equivalent/greater coverage made. It’s on this new uniform mesh that we could run a spline interpolation from the source dataset. Then the input dataset (the triangular or octree) would probe/sample the uniform mesh for data values. This is a bit cumbersome but it should have compelling (and fast) results for 2- and 3-D problems on all mesh types (regular, tree, or tetrahedral).

What I will likely end up doing is creating a new filter in PyVista called interpolate_bspline which will have similar usage to interpolate to perform exactly this. Note that the interpolate filter has this same workflow, but uses a radial Gaussian kernel for the interpolation - would there be interest from this community to add linear, ellipsoidal-gaussian, and/or probabilistic Voronoi kernels for interpolations?

1reaction
prisaecommented, Jul 4, 2019

@lheagy , you said on Slack that in inversions this is a bit less of a concern, as you usually have designed the mesh so that all receivers are in the fine region. However, I think even then it could be beneficial. So if we improve the interpolation, then you would not have to put all receivers in the fine region, so you can end up with a grid with fewer cells and therefore faster inversions. I did some more testing and am convinced that for EM we should not use linear interpolation, not even with constant spacing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An improved interpolation scheme at receiver ... - ResearchGate
An improved interpolation scheme is presented for 2.5‐dimensional marine controlled‐source electromagnetic forward modelling.
Read more >
Improved interpolation scheme at receiver positions for 2.5D ...
In this study, a new interpolation scheme at receivers is proposed, in which the interpolation of EM fields at the cell nodes for...
Read more >
An improved interpolation scheme at receiver ... - Earthdoc
ABSTRACT An improved interpolation scheme is presented for 2.5‐dimensional marine controlled‐source electromagnetic forward modelling.
Read more >
An improved interpolation scheme at receiver positions for 2.5D ...
The interpolation of electromagnetic fields at the cell nodes for the whole computational domain to the receiver locations is discussed in detail.
Read more >
A Novel Method for Frequency-Domain Marine CSEM Finite ...
Accurate Interpolation at Receiver Positions: A Novel Method for ... modeling the EM fields recorded by seafloor receivers ... This feature improves.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found