-
Notifications
You must be signed in to change notification settings - Fork 69
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 computation of horizontal components of gravitational acceleration #85
Comments
Hi @santisoler , I would like to add the other gravity components for point masses. I will start with point masses and learn the new features of Fatiando with you and @leouieda. |
Hi @birocoles. That sounds really nice! I'm glad to help you if you need so! I agree we should start implementing only the horizontal components for the point masses, and leave the tesseroid case for the future. I think you could start with the horizontal components of point masses in Cartesian coordinates. I think it's easier to code and test than the spherical coordinate case. Just remember that we are trying to avoid names like Feel free to open a PR anytime you want. You can add a |
Implement horizontal Cartesian components g_northing and g_easting for point masses (see #85). Components in spherical coordinate system will be implemented in the future. Tests for symmetry of fields and compare against numerical derivatives of the potential.
After #119, I started thinking about these forward functions. The size of What would you think of separating Cartesian and spherical into separate functions? Repeated checks can be moved to helper functions. That opens the way for ellipsoidal coordinate functions as well. |
Hi @leouieda and @santisoler Sorry for closing the issue. It was a mistake. I think separating the Cartesian and spherical stuff for point masses is a good idea. What do you mean by "Repeated checks can be moved to helper functions"? What methods will compose each function? |
Things like checking inputs, broadcasting output arrays, etc, can be moved to a separate function and called from
What do you mean? |
I understood the following:
Is it right? |
No new files are needed. My argument was:
|
So, there will be a single file |
That is what I had in mind. @santisoler what do you think about this? |
I think it's very annoying to pass the desired coordinate system as argument, in fact it could lead to major mistakes if we suddenly forget to pass it (and I think there's a big change to forget that argument). I'm not so sure about the proposed function names (seems too long), but maybe we could give it a try and then change it later. I don't think we should define submodules for forward models on different coordinate systems because only point masses can be computed on Cartesian and spherical coordinates (prisms are only used on Cartesian, while tesseroids only on spherical). So maybe we can live with that function names (they are kind of ugly, but they serve a purpose). |
@leouieda and @santisoler , I will start creating the two functions point_mass_gravity_cartesian and point_mass_gravity_spherical in the file point_mass.py, ok? |
Hi @birocoles! For sure, feel free to open a PR whenever you're ready. |
I think this issue should be closed. Actually, the horizontal components of gravitational acceleration have already been implemented. I will create another issue for adding second derivatives of gravitational acceleration, ok? |
Agreed. No need to open an issue, though. Go straight for the PR instead. 👍 |
Description of the desired feature
Point mass and tesseroid forward models are currently capable of computing only the potential and the vertical (or radial) component of the gravitational acceleration.
Would be nice to add the ability to compute the horizontal componentes, i.e. the easting and northing ones.
Are you willing to help implement and maintain this feature? Yes
The text was updated successfully, but these errors were encountered: