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.