Closed trettberg closed 7 years ago
This should fix the quadrature weights for Gauss-Legendre spherical sampling. Below, you see how the old weights fail to ensure orthonormality.
Nmax = 5; conf = SFS_config; conf.secondary_sources.grid = 'gauss'; [grid,weights] = get_spherical_grid(2*(Nmax+1)^2,conf); [phi,theta] = cart2sph(grid(:,1),grid(:,2),grid(:,3)); Ynm = []; for n = 0:Nmax for m = -n:n Ynm = [Ynm sphharmonics(n,m,theta,phi)]; end end inner_products = Ynm'*diag(weights)*Ynm; figure imagesc([0,(Nmax+1)^2],[0,(Nmax+1)^2],abs(inner_products)); xlabel('n^2 + n + m'); ylabel('n^2 + n + m');
Cool, thanks for he fix.
This should fix the quadrature weights for Gauss-Legendre spherical sampling. Below, you see how the old weights fail to ensure orthonormality.![gauss_old](https://cloud.githubusercontent.com/assets/16763319/19246513/030fcb2e-8f27-11e6-967d-8eb115429e7a.png)