grid_test.m

From Spinach Documentation Wiki
Revision as of 06:48, 30 August 2026 by Kuprov (talk | contribs) (sync with Spinach main f053e432: fifth argument is now ranks (spherical ranks to consider))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Plots grid integration quality as a function of spherical rank. The quality of a grid is defined as the norm of the residual of spherical harmonics or Wigner functions integrated using the grid provided.

Syntax

    grid_profile=grid_test(alphas,betas,gammas,weights,max_rank,sfun)

Parameters

     alphas - alpha Euler angles of the grid, in radians,
              zeros for single-angle grids

      betas - beta Euler angles of the grid, in radians

     gammas - gamma Euler angles of the grid, in radians,
              zeros for two-angle grids

    weights - point weights of the grid

      ranks - spherical ranks to consider

       sfun - spherical function type: for three-angle
              grids use 'D_lmn', for two-angle grids use
              'Y_lm', for single-angle grids use 'Y_l0'.

Outputs

   grid_profile - a vector of residual norms in each spherical rank

Examples

Perfomance of the 400-point 2-angle REPULSION grid on spherical harmonics of different ranks.

Notes

The function also produces a figure showing the absolute value of the integration residual as a function of the spherical rank. A good grid produces near-zero answers for as many spherical ranks as possible.

See also

arclength.m, gaussleg.m, get_hull.m, grid_fibon.m, grid_igloo.m, grid_kron.m, grid_plot.m, grid_polar.m, grid_trian.m, one_vcell_solidangle.m, repulsion.m, shrewd.m, sphtarea.m, sphtrsubd.m, vcell_solidangle.m, voitlander.m, voronoisphere.m, zfs_sampling.m, Kernel_utilities, Appendix I: powder grids

Version 2.6, authors: Ilya Kuprov