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