Calculates far-field properties (scattered field + dipole field) for dipole emission close to a sphere Parameters: - stMdip: structure with results of the Mie computation can be obtained by calling DipSolveSingleSphere with sCoeff='coeff' - nNbTheta: integer scalar number of theta points used for computations - stPinTaunPnTn: structure (optional) with functions of theta pi_n, tau_n, p_n, t_n if omitted, then the functions are computed from scrath it is faster to pass this structure as argument if these functions have already been calculated Returns: structure stEfarAllP with parameters and far fields in the form of Ecr, Ect, Esf, Em0r, Em0t [L x T]. See the supplementary information for more details. The radiation profiles for special cases are also returned. - stEfarAllP.x: [L x 1] - stEfarAllP.theta: [1 x T] - stEfarAllP.lambda: [L x 1] - stEfarAllP.MdRadPerpAllPhi: [L x T] M^d_Rad for perp dipole (phi-independent) - stEfarAllP.MdRadParaPhi0: [L x T] M^d_Rad at phi=0 for para dipole - stEfarAllP.MdRadParaPhi90: [L x T] M^d_Rad at phi=pi/2 for para dipole - stEfarAllP.MRadPerp: [L x 1] MRadPerp obtained from averaging (Eq. 4.37) - stEfarAllP.MRadPara: [L x 1] MRadPara obtained from averaging (Eq. 4.37) The latter two should be consistent with the direct results of DipMcoeff. This file is part of the SPlaC v1.0 package (copyright 2008) Check the README file for further information
0001 global noCheckSum; 0002 if (isempty(noCheckSum) || ~noCheckSum) 0003 disp 'DipFarFieldAllP: Radiation profiles for Mie dipole emission - CheckSum ON' 0004 else 0005 disp 'DipFarFieldAppP: Radiation profiles for Mie dipole emission - CheckSum OFF' 0006 end 0007 0008 0009 % get theta dependence if not provided 0010 theta=linspace(0,pi,nNbTheta); % row [1 x T] 0011 if nargin < 3 0012 stPinTaunPnTn=DipPinTaunPnTn(stMdip.nNmax,transpose(theta)); % fields are [T x nNmax] 0013 end 0014 0015 % stMdip already contains fields cn1, dn1, dn0 0016 stEfarAllP=DipEgenThetaAllPhi(stMdip.lambda,stMdip.epsilonM,stMdip.dn0+stMdip.fn0,stMdip.cn1+stMdip.en1,stMdip.dn1+stMdip.fn1,Inf,theta,'h1',stPinTaunPnTn); 0017 % stEfar contains Ecr, Ect, Esf, Em0r, Em0t 0018 0019 stEfarAllP.x=stMdip.x; 0020 stEfarAllP.theta=theta; 0021 stEfarAllP.lambda=stMdip.lambda; 0022 0023 % computes MdRad for special cases: 0024 stEfarAllP.MdRadPerpAllPhi=8*pi/3*(abs(stEfarAllP.Em0r).^2+ ... 0025 abs(stEfarAllP.Em0t).^2); 0026 stEfarAllP.MdRadParaPhi0=8*pi/3*(abs(stEfarAllP.Ecr).^2+ ... 0027 abs(stEfarAllP.Ect).^2); 0028 stEfarAllP.MdRadParaPhi90=8*pi/3*(abs(stEfarAllP.Esf).^2); 0029 0030 % computes averages for MRadPara and MRadPerp (to check for consistency) 0031 dtheta=pi/(nNbTheta-1); 0032 sintcol=transpose(sin(theta)); % [T x 1] 0033 0034 % these results are [L x 1] 0035 stEfarAllP.MRadPerp=3/4 * (dtheta)* stEfarAllP.MdRadPerpAllPhi * sintcol; 0036 stEfarAllP.MRadPara=3/8 * (dtheta)* (stEfarAllP.MdRadParaPhi0 + ... 0037 stEfarAllP.MdRadParaPhi90) * sintcol; 0038 0039 disp 'DipFarFieldAllP: done...' 0040 disp ' ' 0041 0042