function [V,C,dels,dems,XY]=localization(L,dom,N) % [V,C,dels,dems,XY]=LOCALIZATION(L,dom,N) % % Returns bandlimited spectral eigenfunctions and their associated % eigenvalues localized to a closed domain on the unit sphere. % % INPUT: % % L Bandwidth, maximum angular degree % dom 'patch', 'sqpatch', 'africa', 'eurasia', 'namerica', % 'australia', 'greenland', 'samerica', 'amazon', 'orinoco' % N The splining smoothness [default: 10] or % The parameters for 'patch' and 'dpatch' passed on to KERNELC % % OUTPUT: % % V A list of all the eigenvalues % C A cell array with cosine/sine coefficients eigenfunctions % dels Spherical harmonic degrees % dems Spherical harmonic orders % XY Coordinates of the outlines of the region % % EXAMPLE: % % [V,C,dels,dems]=localization(18,'amazon'); % plotplm([dels dems C{1}]) % % This function uses KERNELC to compute the kernel. % % Last modified by fjsimons-at-alum.mit.edu, 08/20/2006 % And study covariance? % Default inputs defval('L',18) defval('dom','australia') defval('N',10) % Calculates the localization kernel for this domain [Klmlmp,XY]=kernelc(L,dom,N); % Calculates the eigenfunctions/values for this localization problem [C,V]=eig(Klmlmp); [V,isrt]=sort(sum(real(V),1)); V=fliplr(V); C=C(:,fliplr(isrt)); % Sticks the cosine/sine coefficients back % into the right place of LMCOSI [dems,dels,mz,lmc,mzin]=addmon(L); for index=1:size(C,2) CC{index}=reshape(insert(C(:,index),0,mzin),2,length(dems))'; end % Make standard output V=V(:); C=CC;