pyharm.sha

pyharm.sha#

Module to perform surface spherical harmonic analysis using:

  • point data values,

  • mean data values.

Note

This documentation is written for double precision version of PyHarm.

pyharm.sha.CELL_AQ: int = 0#

Spherical harmonic analysis of cell data using the approximate quadrature method.

Type:

int

pyharm.sha.point(pnt, f, nmax, mu=np.float64(1.0), r=np.float64(1.0))#

Performs surface spherical harmonic analysis of point values f at pnt up to maximum degree nmax. Refer to charm_sha for the full documentation.

Parameters:
  • pnt (PointGridDH1, PointGridDH2, PointGridGL) – Quadrature grid points at which f is sampled

  • f (numpy array of floating points) – Signal to be harmonically analysed

  • nmax (integer) – Maximum degree of the analysis

  • mu (floating point) – Scaling parameter to be associated with the output spherical harmonic coefficients, optional. Default is 1.0.

  • r (floating point) – Radius of the reference sphere to be associated with the output spherical harmonic coefficients, optional. Default is 1.0.

Returns:

out – Spherical harmonic coefficients of f

Return type:

Shc

pyharm.sha.cell(cell, f, nmax, method, mu=np.float64(1.0), r=np.float64(1.0))#

Performs surface spherical harmonic analysis of point values f at cell up to maximum degree nmax. Refer to charm_sha for the full documentation.

Parameters:
  • cell (CellGrid) – Grid cells at which f is sampled

  • f (numpy array of floating points) – Signal to be harmonically analysed

  • nmax (integer) – Maximum degree of the analysis

  • method (integer) – Method of the spherical harmonic analysis of area-mean values. Currently the only accepted value is pyharm.sha.CELL_AQ.

  • mu (floating point) – Scaling parameter to be associated with the output spherical harmonic coefficients, optional. Default is 1.0.

  • r (floating point) – Radius of the reference sphere to be associated with the output spherical harmonic coefficients, optional. Default is 1.0.

Returns:

out – Spherical harmonic coefficients of f

Return type:

Shc