Home > atmlab > mie > mie_tetascan.m

mie_tetascan

PURPOSE ^

Computation and plot of Mie Power Scattering function for given

SYNOPSIS ^

function result = mie_tetascan(m, x, nsteps, type)

DESCRIPTION ^

 Computation and plot of Mie Power Scattering function for given 
 complex refractive-index ratio m=m'+im", size parameters x=k0*a, 
 according to Bohren and Huffman (1983) BEWI:TDD122
 type ='pol' for polar diagram, else cartesian for intensity (0)
 polarisation (1) of both modes ('b')
 C. M�zler, May 2002, revised March 2004.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mie_tetascan.m

SOURCE CODE ^

0001 function result = mie_tetascan(m, x, nsteps, type)
0002 
0003 % Computation and plot of Mie Power Scattering function for given
0004 % complex refractive-index ratio m=m'+im", size parameters x=k0*a,
0005 % according to Bohren and Huffman (1983) BEWI:TDD122
0006 % type ='pol' for polar diagram, else cartesian for intensity (0)
0007 % polarisation (1) of both modes ('b')
0008 % C. M�zler, May 2002, revised March 2004.
0009 
0010 nsteps=nsteps;
0011 m1=real(m); m2=imag(m);
0012 nx=(1:nsteps); dteta=pi/(nsteps-1);
0013 teta=(nx-1).*dteta;
0014     for j = 1:nsteps, 
0015         u=cos(teta(j));
0016         a(:,j)=mie_S12(m,x,u);
0017         SL(j)= real(a(1,j)'*a(1,j))/(pi*x^2);
0018         SR(j)= real(a(2,j)'*a(2,j))/(pi*x^2);
0019     end;
0020 S=0.5*(SL+SR);                       % Intenisty
0021 dS=0.5*(SL-SR)./S;                   % Degree of lienar polarisation
0022 dS10=smooth(dS,10);
0023 y=[teta teta+pi;SL SR(nsteps:-1:1)]'; 
0024 tetad=teta*180/pi;
0025 if type=='pol'
0026     polar(y(:,1),y(:,2))
0027     title(sprintf('Mie angular scattering: m=%g+%gi, x=%g',m1,m2,x));
0028     xlabel('Scattering Angle')
0029 elseif type==0,
0030     semilogy(tetad,S,'k-')
0031     title(sprintf('Mie angular scattering: m=%g+%gi, x=%g',m1,m2,x))
0032     xlabel('Scattering Angle')
0033     ylabel('Intensity')
0034 elseif type==1,
0035     plot(tetad,dS,'k-')
0036     title(sprintf('Mie angular scattering: m=%g+%gi, x=%g',m1,m2,x))
0037     xlabel('Scattering Angle'),
0038     ylabel('Degree of Linear Polarisation')
0039 else
0040     semilogy(tetad,SR,'r-',tetad,SL,'b--')
0041     title(sprintf('Mie angular scattering: m=%g+%gi, x=%g',m1,m2,x))
0042     xlabel('Scattering Angle')
0043     legend('SR','SL')
0044 end;
0045 result=[tetad',cos(tetad)',SR',SL',S',dS'];

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