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

Add a function to ignore the tesseroid with zero density or volume #339

Merged
merged 9 commits into from
Aug 26, 2022

Conversation

aguspesce
Copy link
Member

When I am working on tesseroid_layer function, I had an error for tesseroid with zero volume.
So I add a new checked in tesseroid_gravity that ignore the tesseroid with zero density or zero volume

@aguspesce
Copy link
Member Author

Hi @santisoler!
I think that it is OK. Please, take a look at this!

@aguspesce aguspesce changed the title WIP - Add a function to ignote the tesseroid with zero density or volume Add a function to ignore the tesseroid with zero density or volume Aug 19, 2022
aguspesce and others added 4 commits August 25, 2022 13:45
Instead of creating a density array with repeated values, it worth
testing with a diverse density array. This way we can test that the
density values we are getting are actually the ones we want to keep.
Copy link
Member

@santisoler santisoler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great work @aguspesce! I've only changed a few little things:

  • I renamed the variables for the boundaries of the tesseroids to west, east, south, north just because that's the convention we use in Harmonica for those,
  • and added more diversity to the density array you define on the test function. This way we can actually test that the density values we are keeping after running _discard_null_tesseroids() are the right ones.

I'm merging this 🚀

@santisoler santisoler merged commit dc5cf30 into fatiando:main Aug 26, 2022
@santisoler santisoler added the bug Report a problem that needs to be fixed label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report a problem that needs to be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants