Home > atmlab > scattering > mie_ext.m

mie_ext

PURPOSE ^

MIE_EXT Mie extinction for individual particles

SYNOPSIS ^

function [K,a,S] = mie_ext(m,lambda,r,stokes_dim)

DESCRIPTION ^

 MIE_EXT  Mie extinction for individual particles

   Basically an interface to mie.m. The function handles a single
   combination of refractive index and wavelength, but a multiple of
   particle sizes are allowed.

   The data are returned "blown-up" to match selected Stokes dimensionality.
   Total extinction matrix and absorption vector are obtianed by multiplying
   with particle number densities.

   K(1,1) = a(1) + S(1,1). Single scattering albedo is S(1,1)/K(1,1).

 FORMAT  [K,a,S]=mie_ext(m,lambda,r[,stokes_dim])

 OUT     K     Extinction cross-section matrix [m2]. 
               Size(r,stokes_dim,stokes_dim).
         a     Absorption vector [m2]. Size(r,stokes_dim).
         S     Scattering cross-section matrix [m2]. 
               Size(r,stokes_dim,stokes_dim).

 IN      m          complex refractive index (imaginary part should 
                    be positive)   (scalar)
         lambda     wavelength [m] (scalar)
         r          particle radius [m] (vector)   
 OPT     stokes_dim Stokes dimension.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

mie_ext.m

SOURCE CODE ^

0001 % MIE_EXT  Mie extinction for individual particles
0002 %
0003 %   Basically an interface to mie.m. The function handles a single
0004 %   combination of refractive index and wavelength, but a multiple of
0005 %   particle sizes are allowed.
0006 %
0007 %   The data are returned "blown-up" to match selected Stokes dimensionality.
0008 %   Total extinction matrix and absorption vector are obtianed by multiplying
0009 %   with particle number densities.
0010 %
0011 %   K(1,1) = a(1) + S(1,1). Single scattering albedo is S(1,1)/K(1,1).
0012 %
0013 % FORMAT  [K,a,S]=mie_ext(m,lambda,r[,stokes_dim])
0014 %
0015 % OUT     K     Extinction cross-section matrix [m2].
0016 %               Size(r,stokes_dim,stokes_dim).
0017 %         a     Absorption vector [m2]. Size(r,stokes_dim).
0018 %         S     Scattering cross-section matrix [m2].
0019 %               Size(r,stokes_dim,stokes_dim).
0020 %
0021 % IN      m          complex refractive index (imaginary part should
0022 %                    be positive)   (scalar)
0023 %         lambda     wavelength [m] (scalar)
0024 %         r          particle radius [m] (vector)
0025 % OPT     stokes_dim Stokes dimension.
0026 
0027 % History: 2010-02-02 Created by Bengt Rydberg
0028 
0029 function [K,a,S] = mie_ext(m,lambda,r,stokes_dim)
0030 %
0031 if nargin < 4
0032   stokes_dim = 1;
0033 end
0034 %                                                                           %&%
0035 rqre_datatype( m, @istensor0 );                                             %&%
0036 rqre_datatype( lambda, @istensor0 );                                        %&%
0037 rqre_alltypes(r, {@isnumeric,@isvector} );                                  %&%
0038 rqre_alltypes( stokes_dim, {@istensor0,@iswhole} );                         %&%
0039 rqre_in_range( stokes_dim, 1 , 4 );                                         %&%
0040 if imag( m ) < 0                                                            %&%
0041   error( 'Imaginary part of the refractive index must be positive.' );      %&%
0042 end                                                                         %&%
0043   
0044 x = (2*pi/lambda) * r;
0045 
0046 K = zeros( length(r), stokes_dim, stokes_dim );
0047 a = zeros( length(r), stokes_dim );
0048 S = zeros( length(r), stokes_dim, stokes_dim );
0049 
0050 %loop over particle sizes
0051 for i=1:length(x)
0052   area     = pi * r(i)^2;
0053   result   = mie(m, x(i));
0054   %
0055   a(i,1)   = area * result(3);
0056   c1       = area * result(1);
0057   c2       = area * result(2);
0058   %
0059   for j = 1 : stokes_dim
0060     K(i,j,j) = c1;
0061     S(i,j,j) = c2;
0062   end
0063 end

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