Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge overlapping grids #451

Open
ckohnke opened this issue May 23, 2024 · 2 comments
Open

Merge overlapping grids #451

ckohnke opened this issue May 23, 2024 · 2 comments
Labels
enhancement Idea or request for a new feature

Comments

@ckohnke
Copy link

ckohnke commented May 23, 2024

Description of the desired feature:

Grid stitching methods to handle grid discrepancies at overlapping grid points. This may already be possible with the tools in Verde and an example may be beneficial if it is.

Using airborne magnetic data as an example:

  • After processing, leveling, and gridding individual flights of a magnetic survey there is usually a difference between grids in the region where they overlap.
  • Theoretically, these overlapping points are at the same time (diurnal removed), and space (equivalent source, upward continuation, etc.), and should have the same value. However, a variety of factors, such as instrument drift, can cause mismatch.
  • If one is lucky, there is only a static shift between the grids in the overlapping region and can be handled by using a common datum between the datasets.
  • However, if the difference in the data in the overlapping regions are more complex, stitching the grids together using the overlapping points becomes more nebulous and can easily lead to errors in the resulting final grid.

Are you willing to help implement and maintain this feature?

Potentially. I've been having trouble finding mathematical methods and processes to handle such situations.

@ckohnke ckohnke added the enhancement Idea or request for a new feature label May 23, 2024
@leouieda
Copy link
Member

@ckohnke thanks for opening the issue! I have a few thoughts on this:

  1. For gravity and magnetics, I really don't like these stitching approaches because they can heavily bias the long wavelengths. For those, I'd rather go back to the original data and use a single equivalent source model to re-grid them all.
  2. You're right about there not being a good way to do this. For grids of other data types (topography, etc), maybe we could try to blend them in some way that only introduces distortions in the boundaries and doesn't propagate them to the whole grid. Or maybe warn users if there are a lot of discrepancies.
  3. GMT's grdblend does something like this already. It's not yet available in PyGMT. We could try to implement something similar to what it does using xarray. It doesn't seem like it would be too difficult to do.

@leouieda
Copy link
Member

It would also be worth looking into what xarray has for merging datasets. Perhaps that could be enough and we don't have to implement it ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants