shxarray.kernels.isokernelbase#

class shxarray.kernels.isokernelbase.IsoKernelBase(dsiso=None, name=None, transform=None)#

Bases: object

Provides functionality to work with isotropic spherical harmonic kernels

Greensfunc(theta)#

Map an isotropic kernel to a 1D Greens function (as a function of distance from the center) :param theta: discretized isotropic distance in degrees :return: A xarray.DataArray with the 1-D Greens function in the spatial domain

attr = {'kernelstate': 'collapsed', 'shtype': 'shiso'}#
expanddiag(shindex)#
inv()#

Returns the inverse of an already instantiated isotropic Kernel

classmethod invcls()#

Returns the inverse class of the current kernel class :return: An IsoKernelBase class representing the inverse kernel

invert = False#
jacobian(shindex)#
name = 'shkernel'#
property nmax#
property nmin#
plot(ax=None, **kwargs)#

Plot the isotropic kernel as a function of degree

Parameters:
  • ax (matplotlib axis object, optional) – The axis to plot the kernel on. If None, a new axis is created.

  • **kwargs (additional keyword arguments for plotting)

Returns:

ax

Return type:

matplotlib axis object

position(lon, lat)#

Position this kernel on a specific location of the sphere :param lon: Longitude(s) in degrees of position (list like) :param lat: Latitude(s) in degrees of position (list-like) :return: A xarray.DataArray with the kernel located on the specified locations

transform = None#
class shxarray.kernels.isokernelbase.IsoKernelCompositeBase(**kwargs)#

Bases: IsoKernelBase

Combines two isotropic kernels into a joint one

clsleft = None#
clsright = None#
shxarray.kernels.isokernelbase.genCompIsoKernelClass(clsleft, clsright)#

Create a composite kernel class (not instance!) from two isotropic kernels :param clsleft: The left IsoKernelBase class to use :param clsright: The right IsoKernelBase class to use :return: An IsoKernelCompositeBase object representing the composite kernel