Home > atmlab > mie > phasefungi.m

phasefungi

PURPOSE ^

Legendre coefficients gi of phase function p(costeta)

SYNOPSIS ^

function result = phasefungi(m,x)

DESCRIPTION ^

 Legendre coefficients gi of phase function p(costeta) 
 in Mie Theory (e.g. gl in
 Meador and Weaver, 1980 J. Atm. Sci. 37, pp. 630-643)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

phasefungi.m

SOURCE CODE ^

0001 function result = phasefungi(m,x)
0002 
0003 % Legendre coefficients gi of phase function p(costeta)
0004 % in Mie Theory (e.g. gl in
0005 % Meador and Weaver, 1980 J. Atm. Sci. 37, pp. 630-643)
0006 
0007 % Input:
0008 % m: refractive index, x: size parameter
0009 % nj: number of gi values (use about nj=2.5*(x+1))
0010 % nsteps: number of angular values between 0 and pi
0011 % (take about nsteps = 20*nj)
0012 % C. M�zler, July 2003
0013 
0014 nj=ceil((x+1.5)*2.3)
0015 nsteps=25*nj;
0016 dteta=pi/nsteps;
0017 m1=real(m); m2=imag(m);
0018 nx=(1:nsteps);
0019 teta=(nx-0.7)*dteta; u=cos(teta); s=sin(teta);
0020     for j = 1:nsteps, 
0021         a(:,j)=Mie_S12(m,x,u(j));
0022         SL(j)= real(a(1,j)'*a(1,j));
0023         SR(j)= real(a(2,j)'*a(2,j));
0024         A(j)=(SL(j)+SR(j)).*s(j);
0025     end;
0026 Q=mie(m,x);
0027 Qext=Q(1); Qsca=Q(2); asy=Q(5); w=Qsca/Qext;
0028 AA=dteta*A./Qsca/x.^2;
0029 
0030 for jj=1:nj,
0031     x=legendre(jj-1,u);
0032     x0=x(1,:);
0033     gi(jj)=x0*AA';
0034 end;
0035 result=gi;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005