Home > SPlaC v1_0 > Ellipsoids > EllEMproperties.m

EllEMproperties

PURPOSE ^

Returns the most important EM properties of an ellipsoid

SYNOPSIS ^

function stEllEM = EllEMproperties(stEllGeom,epsilonM,epsilonIn,sOption)

DESCRIPTION ^

 Returns the most important EM properties of an ellipsoid

 Parameters:
 - stEllGeom: structure containing geometric properties of the ellipsoid
              can be obtained from calling EllGeomFact, EllOblateGeomFact,
              EllProlateGeomFact, or EllSphereGeomFact
              The fields of stEllGeom are all same size, either scalars or
              row vector [1 x G]
 - epsilonM:  scalar or column [L x 1]
              constant or wavelength-dependent epsilon of outside medium
 - epsilon:  scalar or column [L x 1]
              constant or wavelength-dependent epsilon of ellipsoid
 - sOption:  string (optional)
             if sOption='L' then only the L's are used in stEllGeom
             and the average surface properties are not computed
             if 'x','y', 'z', or 'xz', only properties related to corresponding
             axis are computed. 'xz' should be used for oblate or prolate
             cases instead of 'All', 'x' should be used for spheres instead of 'All'.
             if sOption='All' (default), everything is computed

 Returns:
 - stEllEM: structure with fields, all of dimensions [L x G] with
            wavelength-dependent EM properties
 stEllEM.beta1, 2, and 3: non-dimensional dipolar polarizabilities along
                          each axis (beta_i)
 stEllEM.Aperp1, 2, and 3: maximum (at tip) LFIEF for excitation along each axis (beta_i)
 stEllEM.Apara1, 2, and 3: minimum LFIEF for excitation along each axis (beta_i)
 stEllEM.MLocPerpAve1, 2, and 3: <M_Loc^Perp> for excitation along each axis
 stEllEM.MLocParaAve1, 2, and 3: <M_Loc^Para> for excitation along each axis
 stEllEM.MLocAve1, 2, and 3: <M_Loc> for excitation along each axis
 stEllEM.F0E4Ave1, 2, and 3: <F^0_E4> for excitation along each axis
 stEllEM.F0E4PerpAve1, 2, and 3: <(M_Loc^Perp)^2> for excitation along each axis

 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 if nargin<4, sOption='All'; end
0002 
0003 
0004 bxaxis=true; byaxis=true; bzaxis=true;
0005 if strcmpi(sOption,'x'), byaxis=false; bzaxis=false; end
0006 if strcmpi(sOption,'y'), bxaxis=false; bzaxis=false; end
0007 if strcmpi(sOption,'z'), bxaxis=false; byaxis=false; end
0008 if strcmpi(sOption,'xz'), byaxis=false; end
0009 
0010 % change options for special cases
0011 if strcmpi(stEllGeom.type,'Oblate'), byaxis=false; end
0012 if strcmpi(stEllGeom.type,'Prolate'), byaxis=false; end
0013 if strcmpi(stEllGeom.type,'Sphere'), byaxis=false; bzaxis=false; end
0014 
0015 
0016 % Make epsilonIn and epsilonM vectors of same size (in case one is scalar)
0017 eInVec=0*epsilonIn+0*epsilonM+epsilonIn;
0018 eMVec=0*epsilonIn+0*epsilonM+epsilonM;
0019 nNbLambda=length(eInVec);
0020 % note that if both stEllGeom fields are row vectors [1 x G]
0021 % and epsilons are column vectors [L x 1]
0022 % all products of [L x 1] by [1 x G] will result in [L x G]
0023 % the products are then matrix products
0024 
0025 if (bxaxis)
0026     L1=stEllGeom.L1; % [1 x G]
0027     nNbL=length(L1);
0028     % non-dimensional dipolar polarizabilities along each axis
0029     % Eq. G.7 and permutations
0030     stEllEM.beta1 = repmat(eInVec-eMVec,1,nNbL)./(3*eInVec*L1+eMVec*(3-3*L1));
0031     % Maximum and minimum local field EF on the surface for excitation on a
0032     % principal axis
0033     % Eqs. G.21 and G.22 and permutations
0034     L1mat=repmat(L1,nNbLambda,1);
0035     stEllEM.Aperp1= abs(1 + stEllEM.beta1 .* (3-3*L1mat)).^2;
0036     stEllEM.Apara1= abs(1 - 3*L1mat .* stEllEM.beta1).^2;
0037     % local field at any points on the surface derives from Eq. G.23
0038 end
0039 % now same for the other two axes
0040 if (byaxis)
0041     L2=stEllGeom.L2;
0042     nNbL=length(L2);
0043     stEllEM.beta2 = repmat(eInVec-eMVec,1,nNbL)./(3*eInVec*L2+eMVec*(3-3*L2));
0044     L2mat=repmat(L2,nNbLambda,1);
0045     stEllEM.Aperp2= abs(1 + stEllEM.beta2 .* (3-3*L2mat)).^2;
0046     stEllEM.Apara2= abs(1 - 3*L2mat .* stEllEM.beta2).^2;
0047 end
0048     
0049 if (bzaxis)
0050     L3=stEllGeom.L3;
0051     nNbL=length(L3);
0052     stEllEM.beta3 = repmat(eInVec-eMVec,1,nNbL)./(3*eInVec*L3+eMVec*(3-3*L3));
0053     L3mat=repmat(L3,nNbLambda,1);
0054     stEllEM.Aperp3= abs(1 + stEllEM.beta3 .* (3-3*L3mat)).^2;
0055     stEllEM.Apara3= abs(1 - 3*L3mat .* stEllEM.beta3).^2;
0056 end
0057     
0058 
0059 if ~strcmpi(sOption,'L')
0060 
0061     if (bxaxis)
0062         % Average EFs
0063         % <MLocPerp> from Eq. G.27
0064         stEllEM.MLocPerpAve1 = stEllEM.Aperp1.*repmat(stEllGeom.exix2ave,nNbLambda,1);
0065         % <MLocPara> (Eq. G.28 - Eq. G.27)
0066         stEllEM.MLocParaAve1 = stEllEM.Apara1.*repmat(1-stEllGeom.exix2ave,nNbLambda,1);
0067         % <MLoc> from Eq. G.28
0068         stEllEM.MLocAve1 = stEllEM.MLocParaAve1+stEllEM.MLocPerpAve1;
0069         % average SERS EF <F^0_{E4}> from Eq. G.29 (adapted to use the already
0070         % computed <MLoc> from Eq. G.28
0071         stEllEM.F0E4Ave1 = stEllEM.Apara1 .* (2*stEllEM.MLocAve1 - stEllEM.Apara1) ...
0072             + (stEllEM.Aperp1 - stEllEM.Apara1).^2 .* repmat(stEllGeom.exix4ave,nNbLambda,1);
0073         % average SERS EF <F^{0-Perp}_{E4}> for perpendicular orientation
0074         % <F^{0-Perp}_{E4}>=<(M_Loc^Perp)^2>
0075         stEllEM.F0E4PerpAve1 = (stEllEM.Aperp1).^2 .* repmat(stEllGeom.exix4ave,nNbLambda,1);
0076     end
0077     % now same for the other two axes
0078     if (byaxis)
0079         stEllEM.MLocPerpAve2 = stEllEM.Aperp2 .* repmat(stEllGeom.exiy2ave,nNbLambda,1);
0080         stEllEM.MLocParaAve2 = stEllEM.Apara2.*repmat(1-stEllGeom.exiy2ave,nNbLambda,1);
0081         stEllEM.MLocAve2 = stEllEM.MLocParaAve2+stEllEM.MLocPerpAve2;
0082         stEllEM.F0E4Ave2 = stEllEM.Apara2.*(2*stEllEM.MLocAve2 - stEllEM.Apara2) ...
0083             + (stEllEM.Aperp2 - stEllEM.Apara2).^2 .* repmat(stEllGeom.exiy4ave,nNbLambda,1);
0084         stEllEM.F0E4PerpAve2 = (stEllEM.Aperp2).^2 .* repmat(stEllGeom.exiy4ave,nNbLambda,1);
0085     end
0086     if (bzaxis)
0087         stEllEM.MLocPerpAve3 = stEllEM.Aperp3.*repmat(stEllGeom.exiz2ave,nNbLambda,1);
0088         stEllEM.MLocParaAve3 = stEllEM.Apara3.*repmat(1-stEllGeom.exiz2ave,nNbLambda,1);
0089         stEllEM.MLocAve3 = stEllEM.MLocParaAve3+stEllEM.MLocPerpAve3;
0090         stEllEM.F0E4Ave3 = stEllEM.Apara3.*(2*stEllEM.MLocAve3 - stEllEM.Apara3) ...
0091             + (stEllEM.Aperp3 - stEllEM.Apara3).^2 .* repmat(stEllGeom.exiz4ave,nNbLambda,1);
0092         stEllEM.F0E4PerpAve3 = (stEllEM.Aperp3).^2 .* repmat(stEllGeom.exiz4ave,nNbLambda,1);
0093     end
0094 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)