-
Notifications
You must be signed in to change notification settings - Fork 66
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
Move sanity checks of tesseroids outside jitted functions #84
Labels
enhancement
Idea or request for a new feature
Milestone
Comments
Also, would be nice that error messages were more explicit now they won't be raised inside a Numba jitted function. |
5 tasks
leouieda
pushed a commit
that referenced
this issue
Aug 15, 2019
Refactor the functions that checks if tesseroids are well defined and no computation points are inside tesseroids. Instead of being Numba jitted, they now make use of Numpy array properties. The sanity checks are done on the public Python function that performs the forward modelling instead of calling them on the Numba jitted functions so we can control the error messages better and disable checks if more speed is desired. Make error messages more explicit by showing which tesseroids or computation points are not valid. Improve docstrings by specifying the shape of coordinates and tesseroids arrays. Extend test functions for computation points inside tesseroids in case the longitudinal coordinates of points are shifted by 360 degrees. Fixes #84
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the desired feature
Would be better to remove the functions that perform sanity checks of tesseroids outside the jitted functions intended to perform the forward modelling. For any arbitrary set of tesseroids, the current location of these functions is not an issue, but for future tesseroid arrangements like layers (#83) or meshes, these functions can be simplified: instead of calling them once for each tesseroid, we could write alternate simpler functions that work on the entire tesseroid collection.
So, the proposal is to refactor:
_check_tesseroid()
,_check_point_outside_tesseroid()
and_longitude_continuity()
in order to be called from
tesseroid_gravity()
. We could use some numpy array properties, so there's no need to jit them. They must take the entire set of tesseroids and coordinates as arguments.Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: