A method of S2FunHarmonic.

the harmonic series of a function on the sphere by quadrature, from a callable or from values at nodes; MATLAB’s approximate is the same

Syntax

sF = S2FunHarmonic.quadrature(lambda v: v.z**2)

A callable on a grid of the default bandwidth.

sF = S2FunHarmonic.quadrature(lambda v: v.z**2, cs, bandwidth=16)

In the crystal frame cs.

sF = S2FunHarmonic.quadrature(v, values, bandwidth=8, weights=w)

Values at the nodes v.

sF = S2FunHarmonic.quadrature(g, values)

Values on a quadratureS2Grid g.

Description

The coefficients are the integrals of f against the spherical harmonics, approximated by the quadrature sum over the nodes. A callable is sampled on a quadrature grid exact up to the bandwidth, and a quadratureS2Grid brings its own weights and bandwidth.

Values at scattered nodes take the weights given, which sum to 4 pi, equal ones by default. They give a good approximation only on nodes dense enough for the bandwidth; S2FunHarmonic.interpolate fits scattered values by least squares instead. Values for a list of functions have the nodes first.

Input

nodes a callable of vector3d, vector3d, or a quadratureS2Grid
values the values at the nodes, the nodes along the first axis; for a callable the frame instead
frame the crystalFrame or specimenFrame of the result; by default that of the nodes

Keywords

keyword default description
bandwidth None the largest degree; by default the grid’s for a quadrature grid, else the preference defaultS2Bandwidth
weights None the quadrature weights of the nodes, summing to 4 pi
real None whether the function is real; by default read off the values
antipodal None f(v) = f(-v); by default that of the nodes

Output

sF S2FunHarmonic

See also

S2FunHarmonic, S2FunHarmonic.interpolate, quadratureS2Grid, S2FunHarmonicRepresentation

MATLAB’s S2FunHarmonic.approximate

source

Citing this page. This page is part of the documentation of MTEX, a free and open source MATLAB toolbox for analyzing and modeling crystallographic textures. It was written by The MTEX Developers and is published at https://mtex-toolbox.github.io/S2FunHarmonic.approximate_py.html. If you use MTEX, or reuse text or figures from this page, in your research, please cite

F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63

BibTeX
@article{bachmann2010mtex,
  author  = {F. Bachmann and R. Hielscher and H. Schaeben},
  title   = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
  journal = {Solid State Phenomena},
  volume  = {160},
  pages   = {63-68},
  year    = {2010},
  doi     = {10.4028/www.scientific.net/SSP.160.63},
  url     = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}

Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.