Home > SPlaC v1_0 > BookFigures > MakeFig6_11.m

MakeFig6_11

PURPOSE ^

Function to reproduce Fig. 6.11

SYNOPSIS ^

function MakeFig6_11()

DESCRIPTION ^

 Function to reproduce Fig. 6.11
 Wavelength dependence of the average LFIEF and SERS EF on the sphere surface
 for several cases from 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.11', ...
0017     'Position',[(scrsz(3)-figWidth)/2 50 figWidth figHeight]);
0018 
0019 % radii (in nm)
0020 aArray=[10,25,50,50];
0021 sTitle={'Silver (a=10 nm) in water', ...
0022     'Silver (a=25 nm) in water', ...
0023     'Silver (a=50 nm) in water', ...
0024     'Gold (a=50 nm) in water'};
0025 CYscale={[0.5 4000], [0.5 500], ...
0026     [0.5 300], [2 100]};
0027 
0028 lambdamin=[300,300,300,300];
0029 lambdamax=[600,600,800,800];
0030 
0031 
0032 % loop through each of the four plots to create
0033 for nn=1:4
0034     % wavelengths (column)
0035     lambda=transpose(lambdamin(nn):1:lambdamax(nn)); 
0036     
0037     if (nn<=3) % for silver
0038         % wavelength-dependent dielectric function of sphere material
0039         % vector column, same size as lambda [L x 1]
0040         epsilonIn=epsAg(lambda); % silver
0041     else % for gold
0042         % wavelength-dependent dielectric function of sphere material
0043         % vector column, same size as lambda [L x 1]
0044         epsilonIn=epsAu(lambda); % gold
0045     end
0046 
0047     % sphere radius in nm
0048     a=aArray(nn);
0049 
0050     % Solve problem using Mie theory
0051     stM=PweSolveSingleSphere(nNmax,a,lambda,epsilonM,epsilonIn,'noplot','coeff');
0052     % all necessary results are in structure stM
0053     
0054     % calculate field for all points on the surface (just outside) and averages
0055     nNbTheta=721; % must be odd here to get MLoc(A)
0056     stEsurf=PweEsurf(lambda,epsilonM,stM,a,nNbTheta,'Outside');
0057     
0058     % MLoc(A) is obtained for theta=pi/2, phi=0, i.e.
0059     indtpiov2=(nNbTheta+1)/2;
0060     MLocA=abs(stEsurf.Ecr(:,indtpiov2)).^2+ ...
0061         abs(stEsurf.Ect(:,indtpiov2)).^2; % [L x 1]
0062     
0063     % plot results
0064     subplot(2,2,nn);
0065     hg=semilogy(lambda,MLocA,'--', ...
0066         lambda,stEsurf.MLocAve,'-', ...
0067         lambda,sqrt(stEsurf.F0E4Ave),'-');
0068     set(hg(3),'LineWidth',1.5);
0069     axis([[lambdamin(nn) lambdamax(nn)] CYscale{nn}]);
0070     title(sTitle{nn});
0071     legend({'M_{Loc}(A)','<M_{Loc}>','(<F^0_{E4}>)^{1/2}'},'Location','SouthEast');
0072     xlabel('Wavelength [nm]');
0073     ylabel('Enhancement Factor');
0074 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)