4kbt / NewtonianEotWashToolkit

A simple point-wise Newtonian gravitational force calculator
GNU General Public License v3.0
6 stars 2 forks source link

Conventions/Consistency #18

Open JGLee6 opened 4 years ago

JGLee6 commented 4 years ago

Since this project is encompassing both the Octave, Python, and potentially the Fortran code bases, we should probably decide on some conventions for shape definitions and argument orderings. For instance, even within NEWT, there are three methods for generating the moments of a cylindrical section. Those are the explicit calculations from the Adelberger, Collins, Hoyle paper (qlmACH), the arbitrary degree moments from the Stirling & Schlamminger paper (qlm) with personal contributions from me, and the numerical calculations using scipy.integrate.tplquad (qlmNum). Within those, different calculations allow for differing orderings and number of arguments, like including an inner radius or setting the subtended angle.

Another key difference is in the Octave vs Python Point Gravity versions, where cylindrical shapes extend along the x-axis in the Octave version and along the z-axis in the Python version.

A self-consistency in function and variable names along with coordinate and shape definitions should allow for people to freely jump between code-bases and easily compare between.