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

[REVIEW] Check equal node spacing #14

Closed
santisoler opened this issue Jul 10, 2019 · 1 comment
Closed

[REVIEW] Check equal node spacing #14

santisoler opened this issue Jul 10, 2019 · 1 comment

Comments

@santisoler
Copy link
Contributor

santisoler commented Jul 10, 2019

Part of openjournals/joss-reviews#1544.

When checking if the node spacing is equal on both northing and easting directions, a maximum difference of 1 meter has been hardcoded:

if abs(dx - dy) > 1.0:
warnings.warn("node spacing should be identical {}".format((dx,dy)), RuntimeWarning)

Would be nice to use np.allclose(dx, dy) instead of hardcoding a minumum difference that could raise some unwanted results. For example, if you have a very dense survey with one measurement every 10m and dx is around 1m different from dy, you'll finally get a significant error on the wavenumbers and therefore on the estimated depths even that error won't be reflected on the statistical errors for these depths.

Do you agree?

Besides, wouldn't be better to raise an error instead of a warning? Using non equal spaced grids is acceptable for further computations?

@brmather
Copy link
Owner

Yes this makes sense. I haven't encountered such an issue, but that's not to say it won't happen to someone else. This has been addressed in 585fd43 thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants