This repository was archived by the owner on Dec 22, 2021. It is now read-only.
Tesseroid should warn if ignoring cells too small#228
Merged
Conversation
The code ignores input tesseroids that are too small but does so silently. It should spit out a warning. Also, when dividing below a size 1e-6 (horizontal) I get a ZeroDivisionError. The code should not divide such small tesseroids but warn the user of this. Made two tests that check this. They fail still because I haven't made the correction.
Uses warnings if stopped dividing because of size or if ignoring the tesseroid from the start.
Included an image to show a tesseroid in the module docstring.
leouieda
added a commit
that referenced
this pull request
Aug 11, 2015
Tesseroid should warn if ignoring cells too small
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code currently ignores input tesseroids that are too small (sides < 1e-6 degrees or ~ 0.1m) but does so silently. It should spit out a warning so that the user this is happening.
Also, when dividing below a size 1e-6 (horizontal) I get a
ZeroDivisionError. This is because I stop the small tesseroids from going into the kernel functions but there is no check when the tesseroids are being divided. The code should calculate the effects of these tesseroids without dividing and warn the user of this.This PR implements the tests that catch these two problems and the solutions.
Checklist: