Home > src > main > matlab > s2let_demo4.m

s2let_demo4

PURPOSE ^

s2let_demo4

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 s2let_demo4
 Analyse Earth tomography data as a real MW map.
 Compute the wavelet maps and plot them.
 Plot 1 : multiresolution wavelet scales
 Plot 2 : full resolution wavelet scales

 S2LET package to perform Wavelets on the Sphere.
 Copyright (C) 2012-2015  Boris Leistedt & Jason McEwen
 See LICENSE.txt for license details

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % s2let_demo4
0002 % Analyse Earth tomography data as a real MW map.
0003 % Compute the wavelet maps and plot them.
0004 % Plot 1 : multiresolution wavelet scales
0005 % Plot 2 : full resolution wavelet scales
0006 %
0007 % S2LET package to perform Wavelets on the Sphere.
0008 % Copyright (C) 2012-2015  Boris Leistedt & Jason McEwen
0009 % See LICENSE.txt for license details
0010 
0011 load('EGM2008_Topography_flms_L0128');
0012 f = ssht_inverse(flm, L, 'Reality', true);
0013 
0014 %inputfile = 'data/earth_tomo_mw_128.fits';
0015 %[f, L] = s2let_mw_read_real_map(inputfile);
0016 
0017 B = 6;
0018 N = 3;
0019 J_min = 1;
0020 J = s2let_jmax(L, B);
0021 
0022 zoomfactor = 1.8;
0023 ns = ceil(sqrt(2+J-J_min+1)) ;
0024 ny = 4; % ns - 1 + rem(2+J-J_min+1 , ns) ;
0025 nx = 3; % ns;
0026 
0027 maxfigs = nx*ny;
0028 pltroot = '../../../figs'
0029 configstr = ['N',int2str(N),'_L',int2str(L),'_B',int2str(B),'_Jmin',int2str(J_min)]
0030 
0031 [f_wav, f_scal] = s2let_transform_analysis_mw(f, 'B', B, 'J_min', J_min, 'N', N, 'Upsample', true, 'Spin', 0);
0032 
0033 % FULL RESOLUTION PLOT
0034 figure('Position',[100 100 1300 1000])
0035 subplot(ny, nx, 1);
0036 ssht_plot_mollweide(f, L, 'Mode', 1);
0037 title('Initial data')
0038 campos([0 0 -1]); camup([0 1 0]); zoom(zoomfactor)
0039 v = caxis;
0040 temp = max(abs(v));
0041 caxis([-temp temp])
0042 subplot(ny, nx, 2);
0043 ssht_plot_mollweide(f_scal, L, 'Mode', 1);
0044 campos([0 0 -1]); camup([0 1 0]); zoom(zoomfactor)
0045 v = caxis;
0046 temp = max(abs(v));
0047 caxis([-temp temp])
0048 title('Scaling fct')
0049 ind = 2;
0050 for j = J_min:J
0051     for en = 1:N
0052         ind = ind + 1;
0053         if ind <= maxfigs
0054             subplot(ny, nx, ind);
0055             ssht_plot_mollweide(f_wav{j-J_min+1,en}, L, 'Mode', 1);
0056             campos([0 0 -1]); camup([0 1 0]); zoom(zoomfactor)
0057             v = caxis;
0058             temp = max(abs(v));
0059             caxis([-temp temp])
0060             title(['Wavelet scale j=',int2str(j)-J_min+1,', n=',int2str(en)])
0061         end
0062     end
0063 end
0064 
0065 colormap(jet)
0066 fname = [pltroot,'/s2let_demo4_', configstr, '_earth_multires.png']
0067 print('-r200', '-dpng', fname)
0068 
0069 
0070 
0071 
0072 [f_wav, f_scal] = s2let_transform_analysis_mw(f, 'B', B, 'J_min', J_min, 'N', N, 'Upsample', false, 'Spin', 0);
0073 
0074 % FULL RESOLUTION PLOT
0075 figure('Position',[100 100 1300 1000])
0076 subplot(ny, nx, 1);
0077 ssht_plot_mollweide(f, L, 'Mode', 1);
0078 title('Initial data')
0079 campos([0 0 -1]); camup([0 1 0]); zoom(zoomfactor)
0080 v = caxis;
0081 temp = max(abs(v));
0082 caxis([-temp temp])
0083 subplot(ny, nx, 2);
0084 bl = min([ s2let_bandlimit(J_min-1,J_min,B,L) L ]);
0085 ssht_plot_mollweide(f_scal, bl, 'Mode', 1);
0086 campos([0 0 -1]); camup([0 1 0]); zoom(zoomfactor)
0087 v = caxis;
0088 temp = max(abs(v));
0089 caxis([-temp temp])
0090 title('Scaling fct')
0091 ind = 2;
0092 for j = J_min:J
0093     for en = 1:N
0094         ind = ind + 1;
0095         if ind <= maxfigs
0096             subplot(ny, nx, ind);
0097             bl =  min([ s2let_bandlimit(j,J_min,B,L) L ]);
0098             ssht_plot_mollweide(f_wav{j-J_min+1,en}, bl, 'Mode', 1);
0099             campos([0 0 -1]); camup([0 1 0]); zoom(zoomfactor)
0100             v = caxis;
0101             temp = max(abs(v));
0102             caxis([-temp temp])
0103             title(['Wavelet scale j=',int2str(j)-J_min+1,', n=',int2str(en)])
0104         end
0105     end
0106 end
0107 
0108 
0109 fname = [pltroot,'/s2let_demo4_', configstr, '_earth_fullres.png']
0110 print('-r200', '-dpng', fname)
0111

Generated on Fri 11-Nov-2016 11:50:36 by m2html © 2005