Solves the problem of PWE of a sphere multilayer with Mie theory and produces 6 figures to illustrate the results This function can also be called as MulPweFullMonty(stMP,lambda0,nNbTheta,rMax,nNbRout,nNbRin) where stMP contains the parameter fields. See MulPweSolveMultiSphere for details of the parameters. The results are returned in 4 structures (for further processing if needed) See MulPweSolveMultiSphere (stM), PweSurfProperties (stEsurf), PweFarField (stEfarSca), and PweVolProperties (CstEmap) for a description of these structures. This file is part of the SPlaC v1.0 package (copyright 2008) Check the README file for further information
0001 % rearrange function parameters 0002 if (nargin<6) 0003 nNmax=stMP.nNmax; 0004 Ca=stMP.Ca; 0005 lambda=stMP.lambda; 0006 Cepsilon=stMP.Cepsilon; 0007 end 0008 0009 0010 % Figure 1 0011 % solve the problem and plot Q coeffs and MLocAve 0012 stM=MulPweSolveMultiSphere(nNmax,Ca,lambda,Cepsilon,'plot','coeff'); 0013 0014 % get theta-dep functions to avoid repeated computations 0015 theta=linspace(0,pi,nNbTheta); % row [1 x T] 0016 stPinTaun=PwePinTaun(stM.nNmax,transpose(theta)); % fields are [T x nNmax] 0017 0018 % Spherical averages and theta dependence on the largest sphere surface (outside) 0019 stEsurf=PweSurfProperties(stM,stM.a,nNbTheta,stPinTaun); 0020 0021 % Figure 2 0022 % Plot wavelength dependence surface averages 0023 % other option is 'linear' instead of 'log' 0024 PwePlotLdepSurfAve(stEsurf,'log'); 0025 0026 % Figure 3 0027 % Plot theta dependence of SERS EF on sphere surface for selected 0028 % wavelength 0029 % other option is 'linear' instead of 'log' (default) 0030 PwePlotThetaDep(stEsurf,lambda0,'log'); 0031 0032 % Compute Radiation profile 0033 stEfarSca=PweFarField(stM,nNbTheta,stPinTaun); 0034 % Figure 4 0035 % radiation profile plots at selected wavelength 0036 PwePlotEfarSca(stEfarSca,lambda0); 0037 0038 % Compute electric field everywhere at ONE wavelength 0039 CstEmap=PweVolProperties(stM,lambda0(1),rMax,nNbRout,CnNbRin,nNbTheta,stPinTaun); 0040 0041 % figure 5 0042 % spatial distribution of log10(SERS EF) for phi=0 and 90d 0043 % other options for 'Flog' are 'Flinear', 'Mlog', 'Mlinear', 'Elog,' Elinear. 0044 % and 'half' instead of 'full' 0045 PwePlotEmap(CstEmap,'Flog','full'); 0046 0047 % figure 6 0048 % Distance dependence of surface averages 0049 PwePlotDdepSurfAve(CstEmap,'linear'); 0050