mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
291 stars 186 forks source link

SO3FunRBF Approximation #2211

Closed xnfb closed 1 week ago

xnfb commented 2 months ago

This pull-request features the methods of approximating an ODF explained in

Schaeben, H., Bachmann, F. & Fundenberger, JJ. Construction of weighted crystallographic orientations capturing a given orientation density function. J Mater Sci 52, 2077–2090 (2017). https://doi.org/10.1007/s10853-016-0496-1

It introduces the function

SO3F = SO3FunRBF.approximation(SO3Fun)
SO3F = SO3FunRBF.approximation(SO3G,y)

with some options to specify the way the kernel density should be approximated. Only the normalized case vol(SO3F)=1 is considered, the case vol(SO3F)!=1 has not been considered nor tested.

The function

SO3F = SO3FunRBF.quadrature(SO3Fun)

is technically not a quadrature, but was added to have an equivalent to SO3FunHarmonic.quadrature(SO3Fun).

The function SO3Fun.interpolate has been moved to SOFunRBF.interpolate in order to use the system matrix. Also, the only difference between approximation and interpolation appears to be that the approximation constraints the least squares to sum(weights)=1,weights>0 when operating in the spatial domain.

For the harmonic method, the WignerD function has been updated to follow the revised definition of the Wigner-D functions, which is firstly the change in alpha/beta/gamma convention (used in mtex-3.5.0) and secondly the change in the L2 normalization of the coefficients (since mtex-5.9). There might be a smarter and more efficient way using NSOFT or the new wignerTrafo/Adjoint to omit the very large system matrix.