


s2let_plot_mollweide
Plot wavelet coefficients on multiple Mollweide projections.
The function generates one plot of the scaling function
contribution and a grid of plots for each orientation of
each scale of the wavelet contributions.
Default usage :
s2let_plot_mollweide(wav, scal, B, L, N, J_min, <options>)
wav is cell array with all the wavelet coefficients.
its first index is the wavelet scale j, the second
index is the orientation g, and each element is a
function on the sphere in MW sampling.
scal is the corresponding scaling function contribution
(i.e. just a single function on the sphere).
B is the wavelet parameter.
L is the angular band-limit.
N is the orientational band-limit.
J_min is the first wavelet scale in wav.
Options consist of parameter type and value pairs.
Valid options include:
'Upsample' = { false [multiresolution algorithm (default)],
true [full resolution wavelets] },
'Function' = { 'real' [plot the real part of the input functions (default)],
'imag' [plot the imaginary part of the input functions],
'abs' [plot the absolute value of the input functions] }

0001 function s2let_plot_mollweide(wav, scal, B, L, N, J_min, varargin) 0002 % s2let_plot_mollweide 0003 % Plot wavelet coefficients on multiple Mollweide projections. 0004 % The function generates one plot of the scaling function 0005 % contribution and a grid of plots for each orientation of 0006 % each scale of the wavelet contributions. 0007 % 0008 % Default usage : 0009 % 0010 % s2let_plot_mollweide(wav, scal, B, L, N, J_min, <options>) 0011 % 0012 % wav is cell array with all the wavelet coefficients. 0013 % its first index is the wavelet scale j, the second 0014 % index is the orientation g, and each element is a 0015 % function on the sphere in MW sampling. 0016 % scal is the corresponding scaling function contribution 0017 % (i.e. just a single function on the sphere). 0018 % B is the wavelet parameter. 0019 % L is the angular band-limit. 0020 % N is the orientational band-limit. 0021 % J_min is the first wavelet scale in wav. 0022 % 0023 % Options consist of parameter type and value pairs. 0024 % Valid options include: 0025 % 0026 % 'Upsample' = { false [multiresolution algorithm (default)], 0027 % true [full resolution wavelets] }, 0028 % 'Function' = { 'real' [plot the real part of the input functions (default)], 0029 % 'imag' [plot the imaginary part of the input functions], 0030 % 'abs' [plot the absolute value of the input functions] } 0031 0032 % TODO: make more parameters optional and guess them from the sizes of 0033 % wav and scal 0034 0035 % Parse arguments. 0036 p = inputParser; 0037 p.addRequired('wav'); 0038 p.addRequired('scal', @isnumeric); 0039 p.addRequired('B', @isnumeric); 0040 p.addRequired('L', @isnumeric); 0041 p.addRequired('N', @isnumeric); 0042 p.addRequired('J_min', @isnumeric); 0043 p.addParamValue('Upsample', false, @islogical); 0044 p.addParamValue('Function', 'real', @ischar) 0045 0046 p.parse(wav, scal, B, L, N, J_min, varargin{:}); 0047 0048 args = p.Results; 0049 0050 J = s2let_jmax(L,B); 0051 0052 switch args.Function 0053 case {'real', 'imag', 'abs'} 0054 f = str2func(args.Function); 0055 otherwise 0056 error('Invalid Function parameter. Must be one of "real", "imag", "abs".') 0057 end 0058 0059 figure(11); 0060 0061 if args.Upsample 0062 bl = L; 0063 else 0064 bl = min([s2let_bandlimit(J_min-1, J_min, B, L), L]); 0065 end 0066 ssht_plot_mollweide(f(scal), bl) 0067 0068 figure(12); 0069 0070 iplot = 1; 0071 for j = J_min:J 0072 for n = 1:2*N-1 0073 subplot(J-J_min+1,2*N-1,iplot); 0074 if args.Upsample 0075 bl = L; 0076 else 0077 bl = min([s2let_bandlimit(j, J_min, B, L), L]); 0078 end 0079 ssht_plot_mollweide(f(wav{j-J_min+1,n}), bl) 0080 iplot = iplot + 1; 0081 end 0082 end