The following routines are tagged as

TitleExcerpt
convert (Python) Convert an array of spherical harmonic coefficients to a different normalization convention. Usage coeffs_out = convert(coeffs_in, [normalization_in, normalization_out, csphase_in, csphase_out, lmax]) Returns coeffs_out : ndarray, size (2, lmax+1, lmax+1) An array of spherical harmonic coefficients with the new normalization...
cross_spectrum (Python) Return the cross-spectrum of the spherical harmonic coefficients as a function of spherical harmonic degree. Usage array = cross_spectrum (clm1, clm2, [normalization, degrees, lmax, convention, unit, base]) Returns array : ndarray, shape (len(degrees)) 1-D ndarray of the...
figstyle Set matplotlib parameters for creating publication quality graphics. Usage figstyle([rel_width, screen_dpi, aspect_ratio, max_width]) Parameters rel_width : float, optional, default = 0.75 The relative width of the plot (from 0 to 1) wih respect to max_width. screen_dpi : int, optional, default...
spectrum (Python) Return the spectrum of the magnetic field as a function of spherical harmonic degree. Usage array = mag_spectrum (clm, a, r, [potential, normalization, degrees, lmax, convention, unit, base]) Returns array : ndarray, shape (len(degrees)) 1-D...
BAtoHilmDH (Python) Calculate iteratively the relief along an interface of constant density contrast that corresponds to a given Bouguer anomaly using the algorithm of Wieczorek and Phillips (1998). Usage cilm = BAtoHilmDH (ba, grid, nmax, mass, r0, rho, [filter_type, filter_deg, lmax,...
BAtoHilmRhoHDH (Python) Calculate iteratively the relief along an interface with lateral density variations that corresponds to a given Bouguer anomaly using the algorithm of Wieczorek and Phillips (1998). Usage cilm = BAtoHilmRhoHDH (ba, grid, rho, nmax, mass, r0, [filter_type, filter_deg, lmax,...
CilmMinusDH (Python) Calculate the gravitational potential interior to relief referenced to a spherical interface using the finite-amplitude algorithm of Wieczorek and Phillips (1998). Usage cilm, d = CilmMinusDH (gridin, nmax, mass, rho, [lmax, n, sampling]) Returns cilm : float,...
CilmMinusRhoHDH (Python) Calculate the gravitational potential interior to relief with lateral variations in density referenced to a spherical interface using the finite-amplitude algorithm of Wieczorek and Phillips (1998). Usage cilm, d = CilmMinusRhoHDH (gridin, nmax, mass, rho, [lmax, n, sampling]) Returns...
CilmPlusDH (Python) Calculate the gravitational potential exterior to relief referenced to a spherical interface using the finite-amplitude algorithm of Wieczorek and Phillips (1998). Usage cilm, d = CilmPlusDH (gridin, nmax, mass, rho, [lmax, n, sampling]) Returns cilm : float,...
CilmPlusRhoHDH (Python) Calculate the gravitational potential exterior to relief with lateral variations in density referenced to a spherical interface using the finite-amplitude algorithm of Wieczorek and Phillips (1998). Usage cilm, d = CilmPlusRhoHDH (gridin, nmax, mass, rho, [lmax, n, sampling]) Returns...
ComputeDG82 (Python) Compute the tridiagonal matrix of Grunbaum et al. (1982) that commutes with the space-concentration kernel of a spherical cap. Usage dg82 = ComputeDG82 (lmax, m, theta0) Returns dg82 : float, dimension (lmax-abs(m)+1, lmax-abs(m)+1) The tridiagonal matrix of Grunbaum...
ComputeDM (Python) Compute the space-concentration kernel of a spherical cap. Usage dm = ComputeDM (lmax, m, theta0) Returns dm : float, dimension (lmax+1, lmax+1) The space-concentration kernel or angular order m. Parameters lmax : integer The spherical...
ComputeDMap (Python) Compute the space-concentration kernel of an arbitrary mask on the sphere. Usage dij = ComputeDMap (dh_mask, lmax, [n, sampling]) Returns dij : float, dimension ( (lmax+1)**2, (lmax+1)**2 ) The space-concentration kernel corresponding to the mask dh_mask. Parameters...
Curve2Mask (Python) Given a set of latitude and longitude coordinates representing a closed curve, output a gridded binary mask. Usage mask_dh = Curve2Mask (n, profile, np, [nprofile, sampling, centralmeridian]) Returns dh_mask : integer, dimension (n, n*sampling) A Driscoll...
DHaj (Python) Compute the latitudinal weights used in the Driscoll and Healy (1994) spherical harmonic transform. Usage aj = DHaj (n) Returns aj : float, dimension (n) The latitudinal weights used in the spherical harmonic transform. Parameters n : integer The...
djpi2 (Python) Compute the rotation matrix d(pi/2) used in rotating data expressed in spherical harmonics. Usage dj = djpi2 (lmax) Returns dj : float, dimension (lmax+1, lmax+1, lmax+1) The rotation matrix dj(pi/2). Parameters lmax : integer The maximum spherical...
DownContFilterMA (Python) Compute the minimum-amplitude downward continuation filter of Wieczorek and Phillips (1998). Usage wl = DownContFilterMA (l, half, r, d) Returns wl : float The amplitude of the downward continuation filter. Parameters l : integer The spherical harmonic...
DownContFilterMC (Python) Calculate a minimum-curvature downward continuation filter for a given spherical harmonic degree. Usage wl = DownContFilterMC (l, half, r, d) Returns wl : float The amplitude of the downward continuation filter. Parameters l : integer The spherical...
GLQGridCoord (Python) Compute the latitude and longitude coordinates used in Gauss-Legendre quadrature grids. Usage latglq, longlq = GLQGridCoord (lmax) Returns latglq : float, dimension (lmax+1) The latitude coordinates of a grid, corresponding to the indices [:,0], in degrees. longlq : float, dimension (2*<code...
legendre (Python) Compute all the associated Legendre functions up to a maximum degree and order. Usage plm = legendre (lmax, z, [normalization, csphase, cnorm, packed]) Returns plm : float, dimension (lmax+1, lmax+1) or ((lmax+1)*(lmax+2)/2) An array of...
legendre_lm (Python) Compute the associated Legendre function for a specific degree and order. Usage plm = legendre_lm (l, m, z, [normalization, csphase, cnorm]) Returns plm : float The associated Legendre functions for degree l and order m. <h2...
MakeCircleCoord (Python) Compute the coordinates of a circle placed at a given latitude and longitude. Usage coord = MakeCircleCoord (lat, lon, theta0, [cinterval]) Returns coord : float, dimension(360/cinterval, 2) The latitude [:,0] and longitude [:,1] coordinates of the circle in degrees. ...
MakeEllipseCoord (Python) Compute the coordinates of an ellipse placed at a given latitude and longitude. Usage coord = MakeEllipseCoord (lat, lon, dec, a_theta, b_theta, [cinterval]) Returns coord :float, dimension(360/cinterval, 2) The latitude [:,0] and longitude [:,1] coordinates of the ellipse...
MakeGeoidGridDH (Python) Create a global map of the geoid. Usage geoid = MakeGeoidGridDH (cilm, r0, gm, potref, [lmax, omega, r, order, lmax_calc, a, f, sampling]) Returns geoid : float, dimension (2lmax+2, sampling*2lmax+2)...
MakeGravGradGridDH (Python) Create 2D cylindrical maps on a flattened ellipsoid of the components of the gravity “gradient” tensor in a local north-oriented reference frame. Usage vxx, vyy, vzz, vxy, vxz, vyz = MakeGravGradGridDH (cilm, gm, r0, [a, f, lmax,...
MakeGravGridDH (Python) Create 2D cylindrical maps on a flattened and rotating ellipsoid of all three components of the gravity field, the gravity disturbance, and the gravitational potential. Usage rad, theta, phi, total, pot = MakeGravGridDH (cilm, gm, r0, [a, f, <code...
MakeGrid2D (Python) Create a 2D cylindrical map of arbitrary grid spacing from a set of spherical harmonic coefficients. Usage grid = MakeGrid2D (cilm, interval, [lmax, norm, csphase, f, a, north, south, east, west, dealloc]) Returns <code...
MakeGridDH (Python) Create a 2D map from a set of spherical harmonic coefficients using the Driscoll and Healy (1994) sampling theorem. Usage griddh = MakeGridDH (cilm, [lmax, norm, sampling, csphase, lmax_calc]) Returns griddh : float, dimension (2*lmax+2, sampling*(2*lmax+2))...
MakeGridDHC (Python) Create a 2D complex map from a set of complex spherical harmonic coefficients that conforms with Driscoll and Healy’s (1994) sampling theorem. Usage griddh = MakeGridDHC (cilm, [lmax, norm, sampling, csphase, lmax_calc]) Returns griddh : complex, dimension (2*lmax+2, 2*lmax+2)...
MakeGridGLQ (Python) Create a 2D map from a set of spherical harmonic coefficients sampled on the Gauss-Legendre quadrature nodes. Usage gridglq = MakeGridGLQ (cilm, zero, [lmax, norm, csphase, lmax_calc]) Returns gridglq : float, dimension (lmax+1, 2*lmax+1) A 2D map...
MakeGridGLQC (Python) Create a 2D complex map from a set of complex spherical harmonic coefficients sampled on the Gauss-Legendre quadrature nodes. Usage gridglq = MakeGridGLQC (cilm, zero, [lmax, norm, csphase, lmax_calc]) Returns gridglq : complex, dimension (lmax+1, 2*lmax+1) A...
MakeGridPoint (Python) Evaluate a real function expressed in real spherical harmonics at a single point. Usage value = MakeGridPoint (cilm, lat, lon, [lmax, norm, csphase, dealloc]) Returns value : float Value of the function at (lat, lon). ...
MakeGridPointC (Python) Evaluate a complex function expressed in complex spherical harmonics at a single point. Usage value = MakeGridPointC (cilm, lat, lon, [lmax, norm, csphase, dealloc]) Returns value : complex Value of the function at (lat, lon). ...
MakeMagGradGridDH (Python) Create 2D cylindrical maps on a flattened ellipsoid of the components of the magnetic tensor in a local north-oriented reference frame. Usage vxx, vyy, vzz, vxy, vxz, vyz = MakeMagGradGridDH (cilm, r0, [a, f, lmax, sampling, <code...
MakeMagGridDH (Python) Create 2D cylindrical maps on a flattened ellipsoid of all three vector components of the magnetic field, the magnitude of the magnetic field, and the magnetic potential. Usage rad, theta, phi, total, pot = MakeMagGridDH (cilm, r0, [lmax, a, <code...
NormalGravity (Python) Calculate the normal gravity on a flattened ellipsoid in geocentric coordinates using the formula of Somigliana. Usage value = NormalGravity (geocentriclat, gm, omega, a, b) Returns value : float The normal gravity in SI units. Parameters <code...
PlBar (Python) Compute all the 4-pi (geodesy) normalized Legendre polynomials. Usage p = PlBar (lmax, z) Returns p : float, dimension (lmax+1) An array of 4-pi (geodesy) normalized Legendre polynomials up to degree lmax. Degree l corresponds to array index l....
PlBar_d1 (Python) Compute all the 4-pi (geodesy) normalized Legendre polynomials and first derivatives. Usage p, dp = PlBar_d1 (lmax, z) Returns p : float, dimension (lmax+1) An array of 4-pi (geodesy) normalized Legendre polynomials up to degree lmax. Degree l corresponds...
PLegendre (Python) Compute all the unnormalized Legendre polynomials. Usage p = PLegendre (lmax, z) Returns p : float, dimension (lmax+1) An array of unnormalized Legendre polynomials up to degree lmax. Degree l corresponds to array index l. Parameters ...
PLegendre_d1 (Python) Compute all the unnormalized Legendre polynomials and first derivatives. Usage p, dp = PLegendre_d1 (lmax, z) Returns p : float, dimension (lmax+1) An array of unnormalized Legendre polynomials up to degree lmax. Degree l corresponds to array index <code...
PLegendreA (Python) Compute all the unnormalized associated Legendre functions. Usage p = PLegendreA (lmax, z, [csphase]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of unnormalized associated Legendre functions up to degree lmax. The index corresponds to l*(l+1)/2+m. <h2...
PLegendreA_d1 (Python) Compute all the unnormalized associated Legendre functions and first derivatives. Usage p, dp = PLegendreA_d1 (lmax, z, [csphase]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of unnormalized associated Legendre functions up to degree lmax. The index corresponds...
PlmBar (Python) Compute all the 4-pi (geodesy) normalized associated Legendre functions. Usage p = PlmBar (lmax, z, [csphase, cnorm]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of 4-pi (geodesy) normalized associated Legendre functions up to degree lmax. The index...
PlmBar_d1 (Python) Compute all the 4-pi (geodesy) normalized associated Legendre functions and first derivatives. Usage p, dp = PlmBar_d1 (lmax, z, [csphase, cnorm]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of 4-pi (geodesy) normalized associated Legendre functions up to...
PlmIndex (Python) Compute the index of a array of Legendre functions corresponding to degree l and angular order m. Usage index = PlmIndex (l, m) Returns index : integer Index of an array of associated Legendre functions corresponding to degree l and...
PlmON (Python) Compute all the orthonormalized associated Legendre functions. Usage p = PlmON (lmax, z, [csphase, cnorm]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of orthonormalized associated Legendre functions up to degree lmax. The index corresponds to l*(l+1)/2+m....
PlmON_d1 (Python) Compute all the orthonormalized associated Legendre functions and first derivatives. Usage p, dp = PlmON_d1 (lmax, z, [csphase, cnorm]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of orthonormalized associated Legendre functions up to degree lmax. The...
PlmSchmidt (Python) Compute all the Schmidt semi-normalized associated Legendre functions. Usage p = PlmSchmidt (lmax, z, [csphase, cnorm]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of Schmidt-normalized associated Legendre functions up to degree lmax. The index corresponds to <code...
PlmSchmidt_d1 (Python) Compute all the Schmidt semi-normalized associated Legendre functions and first derivatives. Usage p, dp = PlmSchmidt_d1 (lmax, z, [csphase, cnorm]) Returns p : float, dimension ((lmax+1)*(lmax+2)/2) An array of Schmidt-normalized associated Legendre functions up to degree lmax....
PlON (Python) Compute all the orthonormalized Legendre polynomials. Usage p = PlON (lmax, z) Returns p : float, dimension (lmax+1) An array of orthonormalized Legendre polynomials up to degree lmax. Degree l corresponds to array index l. Parameters ...
PlON_d1 (Python) Compute all the orthonormalized Legendre polynomials and first derivatives. Usage p, dp = PlON_d1 (lmax, z) Returns p : float, dimension (lmax+1) An array of orthonormalized Legendre polynomials up to degree lmax. Degree l corresponds to array index <code...
PlSchmidt (Python) Compute all the Schmidt-normalized Legendre polynomials. Usage p = PlSchmidt (lmax, z) Returns p : float, dimension (lmax+1) An array of Schmidt-normalized Legendre polynomials up to degree lmax. Degree l corresponds to array index l. Parameters ...
PlSchmidt_d1 (Python) Compute all the Schmidt-normalized Legendre polynomials and first derivatives. Usage p, dp = PlSchmidt_d1 (lmax, z) p : float, dimension (lmax+1) An array of Schmidt-normalized Legendre polynomials up to degree lmax. Degree l corresponds to array index l. <code...
SHAdmitCorr (Python) Calculate the admittance and correlation spectra of two real functions. Usage admit, error, corr = SHAdmitCorr (gilm, tilm, [lmax]) Returns admit : float, dimension (lmax+1) The admittance function, which is equal to Sgt/Stt. error : float, dimension...
SHBias (Python) Calculate the (cross-)power spectrum expectation of a windowed function from its global spectrum. Usage outcspectra = SHBias (shh, incspectra, [ldata, lwin, save_cg]) Returns outcspectra : float, dimension (ldata+lwin+1) The expectation of the localized (cross-)power spectrum. Parameters...
SHBiasAdmitCorr (Python) Calculate the expected multitaper admittance and correlation spectra associated with the input global cross-power spectra of two functions. Usage admit, corr = SHAdmitCorr (sgt, sgg, stt, tapers, [lmax, lwin, k, mtdef, taper_wt]) Returns admit :...
SHBiasK (Python) Calculate the multitaper (cross-)power spectrum expectation of a function localized by spherical cap windows. Usage outcspectra = SHBiasK (tapers, incspectra, [lwin, k, ldata, taper_wt, save_cg]) Returns outcspectra : float, dimension (ldata+lwin+1) The expectation of the localized...
SHBiasKMask (Python) Calculate the multitaper (cross-)power spectrum expectation of a function localized by arbitrary windows derived from a mask. Usage outcspectra = SHBiasK (tapers, incspectra, [lwin, k, ldata, taper_wt, save_cg]) Returns outcspectra : float, dimension (ldata+lwin+1) The expectation...
SHCilmToCindex (Python) Convert a three-dimensional array of spherical harmonic coefficients to a two-dimensional indexed array. Usage cindex = SHCilmToCindex (cilm, [lmax]) Returns cindex : float, dimension (2, (lmax+1)*(lmax+2)/2) The indexed output spherical harmonic coefficients. Parameters cilm : float, dimension...
SHCilmToVector (Python) Convert a three-dimensional array of real spherical harmonic coefficients to a 1-dimensional indexed vector. Usage vector = SHCilmToVector (cilm, [lmax]) Returns vector : float, dimension ( (lmax+1)**2 ) The indexed output real spherical harmonic coefficients. Parameters cilm :...
SHCindexToCilm (Python) Convert a two-dimensional indexed array of spherical harmonic coefficients to a three-dimensional array. Usage cilm = SHCindexToCilm (cindex, [lmax]) Returns cilm : float, dimension (2, lmax+1, lmax+1) The input spherical harmonic coefficients. cilm[0,:,:] and cilm[1,:,:] correspond to either the...
SHConfidence (Python) Compute the probability that two functions are correlated at a given spherical harmonic degree for a given correlation coefficient. Usage prob = SHConfidence (l, corr) Returns prob : float Probability that two functions expressed in spherical coefficients with spectral correlation corr are...
SHctor (Python) Convert complex spherical harmonics to real form. Usage rcilm = SHctor (ccilm, [lmax, convention, switchcs]) Returns rcilm : float, dimension (2, lmax+1, lamx+1) The output real spherical harmonic coefficients. rcilm[0,:,:] and rcilm[1,:,:] correspond to the cosine and...
SHExpandDH (Python) Expand an equally sampled or equally spaced grid into spherical harmonics using Driscoll and Healy’s (1994) sampling theorem. Usage cilm = SHExpandDH (griddh, [norm, sampling, csphase, lmax_calc]) Returns cilm : float, dimension (2, n/2, n/2) or (2, <code...
SHExpandDHC (Python) Expand an equally sampled or equally spaced complex grid into complex spherical harmonics using Driscoll and Healy’s (1994) sampling theorem. Usage cilm = SHExpandDHC (griddh, [norm, sampling, csphase, lmax_calc]) Returns cilm : complex, dimension (2, n/2, n/2) or...
SHExpandGLQ (Python) Expand a 2D grid sampled on the Gauss-Legendre quadrature nodes into spherical harmonics. Usage cilm = SHExpandGLQ (gridglq, w, zero, [norm, csphase, lmax_calc]) Returns cilm : float, dimension (2, lmax+1, lmax+1) or (2, lmax_calc+1, lmax_calc+1)...
SHExpandGLQC (Python) Expand a 2D grid sampled on the Gauss-Legendre quadrature nodes into spherical harmonics. Usage cilm = SHExpandGLQC (gridglq, w, zero, [norm, csphase, lmax_calc]) Returns cilm : complex, dimension (2, lmax+1, lmax+1) or (2, lmax_calc+1, lmax_calc+1)...
SHExpandLSQ (Python) Expand a set of irregularly sampled data points into spherical harmonics using a least squares inversion. Usage cilm, chi2 = SHExpandLSQ (d, lat, lon, lmax, [norm, csphase]) Returns cilm : float, dimension (2, lmax+1, lmax+1) The...
SHExpandWLSQ (Python) Expand a set of irregularly sampled data points into spherical harmonics using a weighted least squares inversion. Usage cilm, chi2 = SHExpandLSQ (d, w, lat, lon, lmax, [norm, csphase]) Returns cilm : float, dimension (2, lmax+1,...
SHFindLWin (Python) Determine the spherical-harmonic bandwidth that is necessary to achieve a certain concentration factor. Usage lwin = SHFindLWin (theta0, m, alpha, [taper_number]) Returns lwin : integer The spherical harmonic bandwidth Parameters theta0 : float The angular radius of...
SHGLQ (Python) Precompute the weights and nodes used in the Gauss-Legendre quadrature based spherical harmonics routines. Usage zero, w = SHGLQ (lmax) Returns zero : float, dimension (lmax+1) The nodes used in the Gauss-Legendre quadrature over latitude, determined from a call to PreGLQ....
SHLocalizedAdmitCorr (Python) Calculate the localized admittance and correlation spectra of two functions at a given location using spherical cap localization windows. Usage admit, corr, admit_error, corr_error = SHLocalizedAdmitCorr (gilm, tilm, tapers, taper_order, lat, lon, [k, lwin, lmax, <code...
SHMTCouplingMatrix (Python) This routine returns the multitaper coupling matrix for a given set of power spectra of arbitrary localization windows. This matrix relates the global power spectrum to the expectation of the localized multitaper spectrum. Usage Mmt = SHMTCouplingMatrix (lmax, tapers_power, [lwin, k, taper_wt]) <h2...
SHMTDebias (Python) Invert for the global power spectrum given a multitaper spectrum estimate formed with spherical cap localization windows. Usage mtdebias, lmid = SHMTDebias (mtspectra, tapers, nl, [lmax, lwin, k, taper_wt]) Returns mtdebias : float, dimension (2, n)...
SHMTVarOpt (Python) Calculate the minimum variance and corresponding optimal weights of a localized multitaper spectral estimate. Usage var_opt, var_unit, weight_opt = SHMTVarOpt (l, tapers, taper_order, sff, [lwin, kmax, nocross]) Returns var_opt : float, dimension (kmax) The minimum...
SHMultiply (Python) Multiply two functions and determine the spherical harmonic coefficients of the resulting function. Usage shout = SHMultiply (sh1, sh2, [lmax1, lmax2, norm, csphase]) Returns shout : float, dimension (2, lmax1+lmax2+1, lmax1+lmax2+1) The real spherical harmonic...
SHMultiTaperCSE (Python) Perform a localized multitaper cross-spectral analysis using spherical cap windows. Usage mtse, sd = SHMultiTaperCSE (sh1, sh2, tapers, taper_order, [lmax1, lmax2, lmaxt, k, lat, lon, taper_wt, norm, csphase]) Returns mtse :...
SHMultiTaperMaskCSE (Python) Perform a localized multitaper cross-spectral analysis using arbitrary windows derived from a mask. Usage mtse, sd = SHMultiTaperMaskCSE (sh1, sh2, tapers, [lmax1, lmax2, lmaxt, k, taper_wt, norm, csphase]) Returns mtse : float, dimension (<code...
SHMultiTaperMaskSE (Python) Perform a localized multitaper spectral analysis using arbitrary windows derived from a mask. Usage mtse, sd = SHMultiTaperMaskSE (sh, tapers, [lmax, lmaxt, k, taper_wt, norm, csphase]) Returns mtse : float dimension (lmax-lmaxt+1) The localized...
SHMultiTaperSE (Python) Perform a localized multitaper spectral analysis using spherical cap windows. Usage mtse, sd = SHMultiTaperSE (sh, tapers, taper_order, [lmax, lmaxt, k, lat, lon, taper_wt, norm, csphase]) Returns mtse : float dimension (lmax-<code...
SHRead2 (Python) Read spherical harmonic coefficients from a CHAMP or GRACE-like ascii-formatted file. Usage cilm, lmax, gm, r0_pot, dot, doystart, doyend, epoch = SHRead2 (filename, lmaxin) Returns cilm : float, dimension (2, lmaxin+1, lmaxin+1) The spherical...
SHRead2Error (Python) Read spherical harmonic coefficients from a CHAMP or GRACE-like ascii-formatted file. Usage cilm, error, lmax, gm, r0_pot, dot, doystart, doyend, epoch = SHRead2Error (filename, lmaxin) Returns cilm : float, dimension (2, lmaxin+1, lmaxin+1)...
SHReadError (Python) Read spherical harmonic coefficients and associated errors from an ascii-formatted file. Usage cilm, error, lmax = SHReadError (filename, lmaxin, [skip]) Returns cilm : float, dimension (2, lmaxin+1, lmaxin+1) The spherical harmonic coefficients contained in filename. Note that...
SHReadErrorH (Python) Read spherical harmonic coefficients and associated errors from an ascii-formatted file with a header line. Usage cilm, error, lmax, header = SHReadErrorH (filename, lmaxin, nhead, [skip]) Returns cilm : float, dimension (2, lmaxin+1, lmaxin+1) The spherical...
SHReadH (Python) Read spherical harmonic coefficients from an ascii-formatted file with a header line. Usage cilm, lmax, header = SHReadH (filename, lmaxin, nhead, [skip]) Returns cilm : float, dimension (2, lmaxin+1, lmaxin+1) The spherical harmonic coefficients contained in <code...
SHReadJPL (Python) Read spherical harmonic coefficients from a JPL ascii-formatted file. Usage cilm, lmax, gm = SHReadJPL (filename, lmaxin, [formatstring]) Returns cilm : float, dimension (2, lmaxin+1, lmaxin+1) The spherical harmonic coefficients contained in filename. lmax : integer...
SHReadJPLError (Python) Read spherical harmonic coefficients from a JPL ascii-formatted file. Usage cilm, error, lmax, gm = SHReadJPLError (filename, lmaxin, [formatstring]) Returns cilm : float, dimension (2, lmaxin+1, lmaxin+1) The spherical harmonic coefficients contained in filename. error...
SHReturnTapers (Python) Calculate the eigenfunctions of the spherical-cap concentration problem. Usage tapers, eigenvalues, taper_order = SHReturnTapers (theta0, lmax) Returns tapers : float, dimension (lmax+1, (lmax+1)**2) The spherical harmonic coefficients of the (lmax+1)**2 localization windows. Each column contains the coefficients of...
SHReturnTapersM (Python) Calculate the eigenfunctions of the spherical-cap concentration problem for a single angular order. Usage tapers, eigenvalues = SHReturnTapersM (theta0, lmax, m) Returns tapers : float, dimension (lmax+1, lmax+1) The spherical harmonic coefficients of the lmax+1 localization windows, arranged...
SHReturnTapersMap (Python) Calculate the eigenfunctions and eigenvalues of the space-concentration problem for an arbitrary region. Usage tapers, eigenvalues = SHReturnTapersMap (dh_mask, lmax, [n, ntapers, sampling]) Returns tapers : float, dimension ((lmax+1)**2, ntapers) The spherical harmonic coefficients of the tapers,...
SHRotateCoef (Python) Determine the spherical harmonic coefficients of a real function expressed in complex harmonics rotated by three Euler angles. Usage rcoef = SHRotateCoef (x, coef, dj, [lmax]) Returns rcoef : flaot, dimension (2, (lmax+1)*(lmax+2)/2) The spherical harmonic coefficients of the...
SHRotateRealCoef (Python) Determine the spherical harmonic coefficients of a real function rotated by three Euler angles. Usage cilmrot = SHRotateRealCoef (cilm, x, dj, [lmax]) Returns cilmrot : float, dimension (2, lmax+1, lmax+1) The spherical harmonic coefficients of the rotated function, normalized...
SHRotateTapers (Python) Rotate orthogonal spherical-cap Slepian functions centered at the North pole to a different location. Usage tapersrot = SHRotateTapers(tapers, taper_order, nrot, x, dj) Returns tapersrot : float, dimension ((lmax+1)**2, nrot) An array containing the spherical harmonic coefficients of the...
SHrtoc (Python) Convert real spherical harmonics to complex form. Usage ccilm = SHrtoc (rcilm, [lmax, convention, switchcs]) Returns ccilm : float, dimension (2, lmax+1, lmax+1) The output complex spherical harmonic coefficients. ccilm[0,:,:] and ccilm[1,:,:] correspond to the real and...
SHSjkPG (Python) Calculate the expectation of the product of two functions, each multiplied by a different data taper, for a given spherical harmonic degree and two different angular orders. Usage value = SHSjkPG (incspectra, l, m, mprime, hj_real, hk_real, mj, mk, <code...
SHVectorToCilm (Python) Convert a 1-dimensional indexed vector of real spherical harmonic coefficients to a three-dimensional array. Usage cilm = SHVectorToCilm (vector, [lmax]) Returns cilm : float, dimension (2, lmax+1, lmax+1) The 3-D arrary of output real spherical harmonic coefficients. Parameters ...
SlepianCoeffs (Python) Determine the expansion coefficients of a function for a given set of input Slepian functions. Usage falpha = SlepianCoeffs(galpha, flm, nmax) Returns falpha : float, dimension (nmax) A vector containing the Slepian coefficients of the input function flm. <h2...
SlepianCoeffsToSH (Python) Convert a function expressed in Slepian coefficients to spherical harmonic coefficients. Usage flm = SlepianCoeffsToSH(falpha, galpha, nmax) Returns flm :float, dimension (2, lmax+1, lmax+1) The spherical harmonic coefficients of the global function. Parameters falpha :float, dimension...
spharm (Python) Compute all the spherical harmonic functions up to a maximum degree and order. Usage ylm = spharm (lmax, theta, phi, [normalization, kind, csphase, packed, degrees]) Returns ylm : float or complex, dimension (2, lmax+1, lmax+1)...
spharm_lm_ (Python) Compute the spherical harmonic function for a specific degree and order. Usage ylm = spharm (l, m, theta, phi, [normalization, kind, csphase, degrees]) Returns ylm : float or complex The spherical harmonic function ylm, where l...
SphericalCapCoef (Python) Calculate the spherical harmonic coefficients of a spherical cap. Usage coef = SphericalCapCoef (theta, lmax) Returns coef : float, dimension(lmax+1) The zonal spherical harmonic coefficients of a spherical cap centered over the north pole. Parameters theta : float...
Constants This subpackage defines several constants that are used in analyzing gravity, topography, and magnetic field data of the terrestrial planets. Each object is an astropy Constant that possesses the attributes name, value, unit, uncertainty, and reference. <h2...
Wigner3j (Python) Compute the Wigner-3j symbols for all allowable values of J. Usage w3j, jmin, jmax = Wigner3j (j2, j3, m1, m2, m3) Returns w3j : float, dimension (j2+j3+1) An array of the Wigner-3j symbols evaluated for all...
YilmIndexVector (Python) Compute the index of an 1D array of spherical harmonic coefficients corresponding to i, l, and m. Usage index = YilmIndexVector (i, l, m) Returns index : integer Index of an 1D array of spherical harmonic coefficients corresponding to...
read_icgem_gfc (Python) Read spherical harmonic coefficients from an ICGEM GFC ascii-formatted file. This function only reads files with the gravity field spherical harmonic coefficients. Usage cilm, gm, r0, [errors] = read_icgem_gfc (filename, [errors, lmax, epoch]) Returns cilm : array Array...
spectrum (Python) Return the spectrum of the spherical harmonic coefficients as a function of spherical harmonic degree. Usage array = spectrum (clm, [normalization, degrees, lmax, convention, unit, base]) Returns array : ndarray, shape (len(degrees)) 1-D ndarray of the spectrum. ...