swiftest.shgrav.clm_from_relief#
- swiftest.shgrav.clm_from_relief(mass, density, grid, lmax=6, lref_radius=False, ref_radius=None)[source]#
Creates and returns the gravity coefficients for a body with a given DH grid upto a certain maximum degree lmax. Uses pyshtools.
- Parameters:
mass (float) β mass of the central body
density (float) β density of the central body
grid (array, shape []) β DH grid of the surface relief of the body
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.