swiftest.shgrav.clm_from_ellipsoid#
- swiftest.shgrav.clm_from_ellipsoid(mass, density, a, b=None, c=None, lmax=6, lref_radius=False, ref_radius=None)[source]#
Creates and returns the gravity coefficients for an ellipsoid with principal axes a, b, c upto a certain maximum degree lmax.
Uses pyshtools. No units necessary for a, b, & c. However, they need to be in the same units (DU).
- Parameters:
mass (float) – mass of the central body
density (float) – density of the central body
a (float) – length of the pricipal axis aligned with the x axis
b (float, optional, default = a) – length of the pricipal axis aligned with the y axis
c (float, optional, default = b) – length of the pricipal axis aligned with the z axis
lmax (int, optional, default = 6) – The maximum spherical harmonic degree resolvable by the grid.
lref_radius (boolean, optional, default = False) – Boolean value to return the reference radius calculated by SHTOOLS
ref_radius (float, optional, default = None) – Reference radius to scale the gravitational coefficients to
- Returns:
clm (ndarry, shape (2, lmax+1, lmax+1)) – numpy ndarray of the gravitational potential spherical harmonic coefficients. This is a three-dimensional array formatted as coeffs[i, degree, order], where i=0 corresponds to positive orders and i=1 to negative orders.