Home > SPlaC v1_0 > BookFigures > MakeFig6_1.m

MakeFig6_1

PURPOSE ^

Function to reproduce Fig. 6.1

SYNOPSIS ^

function MakeFig6_1()

DESCRIPTION ^

 Function to reproduce Fig. 6.1
 Wavelength-dependence of decay rate EFs for a dipole in air emitting
 close to a planar silver or gold surface.

 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 % create, position, and resize figure
0002 scrsz = get(0,'ScreenSize'); % scrsz(4) contains screen height
0003 figAspectRatio=1;
0004 figHeight=scrsz(4)-150;
0005 figWidth=figAspectRatio*figHeight;
0006 figure('Name','Fig. 6.1', ...
0007     'Position',[(scrsz(3)-figWidth)/2 50 figWidth figHeight]);
0008 
0009 
0010 % dielectric constant of outside medium (real positive)
0011 epsilonM=1.0; % air
0012 
0013 % loop twice for silver and gold cases
0014 for nn=1:2
0015 
0016     if nn==1 % silver
0017         % wavelengths (column)
0018         lambda=transpose(200:2:800);
0019         epsilonIn=epsAg(lambda);
0020         sMetal='Ag';
0021     else % gold
0022         % wavelengths (column)
0023         lambda=transpose(400:10:1000);
0024         epsilonIn=epsAu(lambda);
0025         sMetal='Au';
0026     end        
0027     
0028     % Solve problem dipole emission problem for d=1,5,10,20 nm
0029     nNbStep=5000; % for integrals
0030     disp(['Computations for ' sMetal]);
0031     stAllMd1=PlnSinglePlaneDecayRateEFs(epsilonM,lambda,epsilonIn,1,nNbStep);
0032     stAllMd5=PlnSinglePlaneDecayRateEFs(epsilonM,lambda,epsilonIn,5,nNbStep);
0033     stAllMd10=PlnSinglePlaneDecayRateEFs(epsilonM,lambda,epsilonIn,10,nNbStep);
0034     stAllMd20=PlnSinglePlaneDecayRateEFs(epsilonM,lambda,epsilonIn,20,nNbStep);
0035 
0036     % plot results
0037     % top plot (MTotPerp)
0038     subplot(2,2,nn);
0039 
0040     h=semilogy(lambda,stAllMd1.MTotPerp, '-', ...
0041         lambda,stAllMd5.MTotPerp, '-', ...
0042         lambda,stAllMd10.MTotPerp, '-');
0043     line(lambda,stAllMd1.MTotPerpESA,'LineStyle',':','Color',get(h(1),'Color'));
0044     line(lambda,stAllMd5.MTotPerpESA,'LineStyle',':','Color',get(h(2),'Color'));
0045     line(lambda,stAllMd10.MTotPerpESA,'LineStyle',':','Color',get(h(3),'Color'));
0046     
0047     set(gca,'YLim',[1 1.2e6]);
0048     title(['Total M_{Tot} - Perp dipole in air on ' sMetal]);
0049     xlabel('Wavelength [nm]');
0050     ylabel('M_{Tot}');
0051     legend({'d=1nm','d=5mn','d=10nm','d=1nm (ESA)', ...
0052         'd=5mn (ESA)','d=10nm (ESA)'},'Location','NorthEast');
0053     
0054     % bottom plot (MRad)
0055     subplot(2,2,2+nn);
0056 
0057     h=semilogy(lambda,stAllMd1.MRadPerp, '-', ...
0058         lambda,stAllMd5.MRadPerp, '--', ...
0059         lambda,stAllMd10.MRadPerp, '-', ...
0060         lambda,stAllMd20.MRadPerp, '--');
0061     legend({'d=1nm','d=5mn','d=10nm','d=20nm'},'Location','South');
0062     line(lambda,stAllMd1.MRadPara,'LineStyle','-','Color',get(h(1),'Color'));
0063     line(lambda,stAllMd5.MRadPara,'LineStyle','--','Color',get(h(2),'Color'));
0064     line(lambda,stAllMd10.MRadPara,'LineStyle','-','Color',get(h(3),'Color'));
0065     line(lambda,stAllMd20.MRadPara,'LineStyle','--','Color',get(h(4),'Color'));
0066     
0067     set(gca,'YLim',[0.01 4]);
0068     title(['Radiative M_{Rad} - dipole in air on ' sMetal]);
0069     xlabel('Wavelength [nm]');
0070     ylabel('M_{Rad}');
0071     text(600,0.08,'Para');
0072     text(600,2,'Perp');
0073 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)