0001 if nargin<3
0002 sHalf='full';
0003 end
0004
0005 if nargin<2
0006 sLinLog='Flog';
0007 end
0008
0009 nNbMap=length(CstEmap);
0010
0011
0012 scrsz = get(0,'ScreenSize');
0013 figAspectRatio=2;
0014 figWidth=scrsz(3);
0015 figure('Name','SERS EF maps', ...
0016 'Position',[(scrsz(3)-figWidth)/2 scrsz(4)-150-figWidth/figAspectRatio figWidth figWidth/figAspectRatio]);
0017 hax1=subplot(1,2,1); hold on;
0018 hax2=subplot(1,2,2); hold on;
0019 set(hax1,'Outerposition',[0,0,0.5,1.0])
0020 set(hax2,'Outerposition',[0.5,0,0.5,1.0])
0021
0022
0023 rMax=0;
0024 for nn=1:nNbMap
0025 if isstruct(CstEmap)
0026 F0E4phi0map=(abs(CstEmap.Ecr).^2+abs(CstEmap.Ect).^2).^2;
0027 F0E4phi90map=abs(CstEmap.Esf).^4;
0028 theta=CstEmap.theta;
0029 rVec=CstEmap.r;
0030 lambda0=CstEmap.lambda0;
0031 else
0032 F0E4phi0map=(abs(CstEmap{nn}.Ecr).^2+abs(CstEmap{nn}.Ect).^2).^2;
0033 F0E4phi90map=abs(CstEmap{nn}.Esf).^4;
0034 theta=CstEmap{nn}.theta;
0035 rVec=CstEmap{nn}.r;
0036 lambda0=CstEmap{1}.lambda0;
0037
0038 end
0039
0040 rMax=max(rMax,max(rVec));
0041
0042
0043 indr0=find(rVec==0);
0044 if ~isempty(indr0)
0045 indcor=[1:(indr0-1) (indr0+1):length(rVec)];
0046 rVec=rVec(indcor);
0047 F0E4phi0map=F0E4phi0map(indcor,:);
0048 F0E4phi90map=F0E4phi90map(indcor,:);
0049 end
0050
0051
0052 switch lower(sLinLog)
0053 case 'elinear'
0054 F0E4phi0map=(F0E4phi0map).^(0.25);
0055 F0E4phi90map=(F0E4phi90map).^(0.25);
0056 case 'elog'
0057 F0E4phi0map=0.25*log10(F0E4phi0map);
0058 F0E4phi90map=0.25*log10(F0E4phi90map);
0059 case 'mlinear'
0060 F0E4phi0map=sqrt(F0E4phi0map);
0061 F0E4phi90map=sqrt(F0E4phi90map);
0062 case 'mlog'
0063 F0E4phi0map=0.5*log10(F0E4phi0map);
0064 F0E4phi90map=0.5*log10(F0E4phi90map);
0065 case 'flinear'
0066
0067 otherwise
0068 F0E4phi0map=log10(F0E4phi0map);
0069 F0E4phi90map=log10(F0E4phi90map);
0070 end
0071
0072
0073 xymat = rVec * sin(theta);
0074 zmat = rVec * cos(theta);
0075 if strcmpi(sHalf,'half')
0076
0077 axes(hax1);
0078 contourf(xymat,zmat,F0E4phi0map);
0079
0080 axes(hax2);
0081 contourf(xymat,zmat,F0E4phi90map);
0082 else
0083
0084 indNegTheta=length(theta):-1:2;
0085 indAllTheta=[indNegTheta,1:length(theta)];
0086 axes(hax1);
0087 contourf([-xymat(:,indNegTheta), xymat],zmat(:,indAllTheta),F0E4phi0map(:,indAllTheta) );
0088 axes(hax2);
0089 contourf([-xymat(:,indNegTheta), xymat],zmat(:,indAllTheta),F0E4phi90map(:,indAllTheta) );
0090 end
0091 end
0092
0093 switch lower(sLinLog)
0094 case 'elinear'
0095 sTitle='|E/E_0|';
0096 case 'elog'
0097 sTitle='log10 |E/E_0|';
0098 case 'mlinear'
0099 sTitle='M_{Loc}';
0100 case 'mlog'
0101 sTitle='log10 M_{Loc}';
0102 case 'flinear'
0103 sTitle='F_{E4}^0';
0104 otherwise
0105 sTitle='log10 F_{E4}^0';
0106 end
0107
0108
0109 axes(hax1);
0110 axis equal;
0111 if strcmpi(sHalf,'half')
0112 axis([0 rMax -rMax rMax]);
0113 else
0114 axis([-rMax rMax -rMax rMax]);
0115 end
0116 hold off;
0117 caxis(get(gca,'CLim'))
0118 colorbar('peer',gca);
0119 xlabel('x [nm]');
0120 ylabel('z [nm]');
0121 title([sTitle '(\phi=0) at \lambda=' num2str(lambda0) 'nm']);
0122
0123 axes(hax2);
0124 axis equal;
0125 if strcmpi(sHalf,'half')
0126 axis([0 rMax -rMax rMax]);
0127 else
0128 axis([-rMax rMax -rMax rMax]);
0129 end
0130 hold off;
0131 caxis(get(gca,'CLim'))
0132 colorbar('peer',gca);
0133 xlabel('y [nm]');
0134 ylabel('z [nm]');
0135 title([sTitle '(\phi=90^\circ) at \lambda=' num2str(lambda0) 'nm']);