Home > SPlaC v1_0 > BookFigures > MakeFig6_12.m

MakeFig6_12

PURPOSE ^

Function to reproduce Fig. 6.12

SYNOPSIS ^

function MakeFig6_12()

DESCRIPTION ^

 Function to reproduce Fig. 6.12
 Distance dependence of punctual and  average SERS EF on the sphere surface
 for several cases from the ES approximation and Mie theory.

 This file is part of the SPlaC v1.0 package (copyright 2008)
 Check the README file for further information

EXAMPLE OF OUTPUT ^

Example figure output

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 global noCheckSum;
0002 noCheckSum=true; % no check for numerical problems (much faster)
0003 % noCheckSum=false; % to check for numerical problems with Mie
0004 
0005 % N_{max} for Mie series
0006 nNmax=50; % same for all plots
0007 
0008 % dielectric constant of outside medium (real positive)
0009 epsilonM=1.77; % water (same for all plots)
0010 
0011 % create, position, and resize figure
0012 scrsz = get(0,'ScreenSize'); % scrsz(4) contains screen height
0013 figAspectRatio=1.2;
0014 figHeight=scrsz(4)-150;
0015 figWidth=figAspectRatio*figHeight;
0016 figure('Name','Fig. 6.12', ...
0017     'Position',[(scrsz(3)-figWidth)/2 50 figWidth figHeight]);
0018 
0019 % radii (in nm)
0020 aArray=[30,25,50,50];
0021 sTitle={'Silver (a=30) in water - ESA', ...
0022     'Silver (a=25 nm) in water - \lambda=418nm (dipolar LSP)', ...
0023     'Silver (a=50 nm) in water - \lambda=492nm (dipolar LSP)', ...
0024     'Silver (a=50 nm) in water - \lambda=393nm (quadrupolar LSP)'};
0025 
0026 % fist lambda (ESA) is irrelevant
0027 lambdaArray=[0, 418, 492, 393];
0028 
0029 % start with first plot (ESA)
0030 a=30;
0031 dVec=transpose(0:0.5:10); % [D x 1]
0032 FESA=1./(1+dVec/a).^12;
0033 % coverage dependence
0034 covVec=transpose(1:1:21);
0035 FintESA=0*covVec;
0036 FintESA(1)=FESA(1);
0037 for nn=2:length(covVec)
0038     FintESA(nn)=FintESA(nn-1)+FESA(nn);
0039 end;
0040 
0041 % plot results
0042 axtmp=subplot(2,2,1);
0043 postmp=get(axtmp,'Position');
0044 delete(axtmp);
0045 ax1=axes('Position',postmp, ...
0046        'XAxisLocation','bottom','Xcolor','b', ...
0047        'YAxisLocation','left','Ycolor','b', ...
0048        'XLim',[0 10],'YLim',[0 1.1]);
0049 set(get(ax1,'XLabel'),'String','Distance, d [nm]');
0050 set(get(ax1,'YLabel'),'String','SERS EF (normalized to d=0)');
0051 
0052 line(dVec,FESA,'Color','b','LineStyle','-');
0053 
0054 ax2=axes('Position',get(ax1,'Position'),...
0055        'XAxisLocation','top','XColor','r', ...
0056        'YAxisLocation','right','Ycolor','r', ...
0057        'Color','none', ...
0058        'YScale','linear', ...
0059        'YLim',[0 7.8],'XLim',[1 21]);
0060 set(get(ax2,'XLabel'),'String','Coverage [monolayer], for d_L=0.5 nm');
0061 set(get(ax2,'YLabel'),'String','SERS intensity [=1 for first layer]');
0062 
0063 line(covVec,FintESA,'Color','r','LineStyle','-');
0064 title(sTitle{1});
0065 
0066 nNbTheta=721; % must be 4n+1 here to get MLoc(AC)
0067 % distance from surface (in nm)
0068 dVec=transpose(linspace(0,10,11)); % [D x 1]
0069 
0070 % loop through each of the three other plots to create
0071 for nn=2:4
0072     % wavelength (scalar here)
0073     lambda=lambdaArray(nn); 
0074     
0075     % wavelength-dependent dielectric function of sphere material
0076     % vector column, same size as lambda, scalar [1 x 1] here
0077     epsilonIn=epsAg(lambda); % silver
0078 
0079     % sphere radius in nm
0080     a=aArray(nn);
0081 
0082     % Solve problem using Mie theory
0083     stM=PweSolveSingleSphere(nNmax,a,lambda,epsilonM,epsilonIn,'noplot','coeff');
0084     % all necessary results are in structure stM
0085     
0086     % calculate distance-dependence field and surface averages for all points
0087     % on a r=a+d surface
0088     rVec=a+dVec; %[D x 1]
0089     stEmap=PweEmap(lambda,epsilonM,stM,rVec,nNbTheta,'Outside');
0090     
0091     % F(A) is obtained for theta=pi/2, phi=0, i.e.
0092     indtpiov2=(nNbTheta+1)/2;
0093     FA=(abs(stEmap.Ecr(:,indtpiov2)).^2+ ...
0094         abs(stEmap.Ect(:,indtpiov2)).^2).^2; % [D x 1]
0095     % F(C) is obtained for theta=0, phi=0, i.e.
0096     FC1=(abs(stEmap.Ecr(:,1)).^2+ ...
0097         abs(stEmap.Ect(:,1)).^2).^2; % [D x 1]
0098     % F(AC) is obtained for theta=pi/4, phi=0, i.e.
0099     indtpiov4=(nNbTheta+3)/4;
0100     FAC=(abs(stEmap.Ecr(:,indtpiov4)).^2+ ...
0101         abs(stEmap.Ect(:,indtpiov4)).^2).^2; % [D x 1]
0102     
0103     % plot results
0104     subplot(2,2,nn);
0105     if (nn==4) % plot F(AC) instead of F(C)
0106         hg=plot(dVec,FA./FA(1),'-^', ...
0107             dVec,FAC./FAC(1),'-s', ...
0108             dVec,stEmap.F0E4Ave./stEmap.F0E4Ave(1),'-o');
0109         legend({'F^0_{E4}(A)','F^0_{E4}(AC)','<F^0_{E4}>'},'Location','NorthEast');
0110     else
0111         hg=plot(dVec,FA./FA(1),'-^', ...
0112             dVec,FC1./FC1(1),'-s', ...
0113             dVec,stEmap.F0E4Ave./stEmap.F0E4Ave(1),'-o');
0114         legend({'F^0_{E4}(A)','F^0_{E4}(C)','<F^0_{E4}>'},'Location','NorthEast');
0115     end
0116     set(hg(3),'MarkerFaceColor',get(hg(3),'Color'));
0117     axis([0 10 0 1.1]);
0118     title(sTitle{nn});
0119     xlabel('Distance, d [nm]');
0120     ylabel('SERS EF (normalized to d=0)');
0121 end

This web page is part of the SPlaC package © 2008. Contact: Eric Le Ru
Generated on Wed 03-Dec-2008 11:10:14 by m2html © 2003 (adapted)