Skip to content

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

Merged
santisoler merged 9 commits into
fatiando:mainfrom
aguspesce:tesseroid_0vol
Aug 26, 2022
Merged

santisoler merged 9 commits into
fatiando:mainfrom
aguspesce:tesseroid_0vol

Conversation

@aguspesce

Copy link
Copy Markdown
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
Copy Markdown
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.

@santisoler santisoler left a comment

Copy link
Copy Markdown
Member

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