From 0bdea66b805d144f766efdca3b2959a3b244b61a Mon Sep 17 00:00:00 2001 From: Marco Berzborn Date: Wed, 4 Apr 2018 15:01:42 +0200 Subject: [PATCH] Download hyperinterpolation sampling points from Womersleys homepage Allows for samplings with higher SH orders and improved numeric precision --- .../ita_sph_sampling_hyperinterpolation.m | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/applications/SphericalHarmonics/ita_sph_sampling/ita_sph_sampling_hyperinterpolation.m b/applications/SphericalHarmonics/ita_sph_sampling/ita_sph_sampling_hyperinterpolation.m index b01383f..fc08b57 100644 --- a/applications/SphericalHarmonics/ita_sph_sampling/ita_sph_sampling_hyperinterpolation.m +++ b/applications/SphericalHarmonics/ita_sph_sampling/ita_sph_sampling_hyperinterpolation.m @@ -1,6 +1,9 @@ function s = ita_sph_sampling_hyperinterpolation(nmax) % This function creates a spherical sampling with the property that its % spherical harmonics function can be inverted. +% +% The set of points is downloaded from Womersleys homepage: +% http://web.maths.unsw.edu.au/~rsw/Sphere/Extremal/New/index.html % % The SHT thus writes: f_SH = inv(s.Y) * f; % and the ISHT: f = s.Y * f_SH; @@ -10,18 +13,18 @@ function s = ita_sph_sampling_hyperinterpolation(nmax) % You can find the license for this m-file in the application folder. % -% can be a natural number 1..29 -if nmax > 29 +% can be a natural number 1..165 +if nmax > 165 error('pre-calculated points only for hyperinterpolation up to order 29'); end nSH = (nmax+1).^2; -filename = ['/Womersley/md' num2str(nmax,'%02d') '.' num2str(nSH,'%04d')]; +filename = ['md' num2str(nmax,'%03d') '.' num2str(nSH,'%05d')]; -url = 'http://www.ita-toolbox.org/Griddata'; +url = 'http://web.maths.unsw.edu.au/~rsw/Sphere/Extremal/New/'; hyper = str2num(urlread([url filename])); %#ok s = itaSamplingSph(hyper(:,1:3),'cart'); s.r = ones(s.nPoints,1); s.weights = hyper(:,4); -s.nmax = nmax; +s.nmax = nmax; \ No newline at end of file -- GitLab