Home > SPlaC v1_0 > Mie > PWE > PwePlotEfarSca.m

PwePlotEfarSca

PURPOSE ^

Plots the radiation profiles from the results of PweFarField.

SYNOPSIS ^

function PwePlotEfarSca(stEfarSca, lambda0)

DESCRIPTION ^

 Plots the radiation profiles from the results of PweFarField.

 Parameters:
 - stEfarSca: obtained from PweFarField
 - lambda0: scalar or vector (short vector otherwise plot would be messy)
            wavelength(s) in nm for which the plots are done

 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 lambda=stEfarSca.lambda;
0002 theta=stEfarSca.theta;
0003 nNbTheta=length(theta);
0004 indNegTheta=length(theta):-1:2;
0005 indAllTheta=[indNegTheta,1:length(theta)];
0006 thetaAll=[-theta(indNegTheta), theta];
0007 
0008 %indLambda=zeros(1,length(lambda0));
0009 sLegend=cell(1,length(lambda0));
0010 dQS1=zeros(length(lambda0),nNbTheta);
0011 dQS2=zeros(length(lambda0),nNbTheta);
0012 qMax=0;
0013 qMin=1e200;
0014 for ll=1:length(lambda0)
0015     ind=find(lambda==lambda0(ll),1);
0016     if isempty(ind)
0017         disp(['PwePlotEfarSca: lambda=' num2str(lambda0(ll)) ...
0018             ' cannot be found. Using lambda=' num2str(lambda(1)) ' instead']);
0019         ind=1;
0020     end
0021     % theta-dependent dQS1 and dQS2
0022     dQS1(ll,:)=abs(stEfarSca.S1(ind,:)).^2 /pi ./ repmat(stEfarSca.x(ind).^2,1,nNbTheta);
0023     dQS2(ll,:)=abs(stEfarSca.S2(ind,:)).^2 /pi ./ repmat(stEfarSca.x(ind).^2,1,nNbTheta);
0024     qMax=max(qMax,max(dQS1(ll,:))); % find limits for axis scale
0025     qMax=max(qMax,max(dQS2(ll,:)));
0026     qMin=min(qMin,min(dQS1(ll,:)));
0027     qMin=min(qMin,min(dQS2(ll,:)));
0028     % prepare legend for figure
0029     sLegend{2*ll-1}=['dQ_{Sca}^{S1}/d\Omega - \lambda=' num2str(lambda(ind))];
0030     sLegend{2*ll}  =['dQ_{Sca}^{S2}/d\Omega - \lambda=' num2str(lambda(ind))];
0031 end
0032 
0033 figure('Name','Radiation profile');
0034 h = polar([0 2*pi], [qMin qMax]);
0035 delete(h);
0036 hold on;
0037 % define four colors
0038 scol='mbrg';
0039 for ll=1:length(lambda0)
0040     polar(thetaAll,dQS1(ll,indAllTheta),scol(1+mod(ll,4)));
0041     polar(thetaAll,dQS2(ll,indAllTheta),[scol(1+mod(ll,4)) ':']);
0042 end
0043 hold off;
0044 
0045 title('Far field radiation profiles of scattered field');
0046 xlabel('Theta [degrees]');
0047 ylabel('dQ/d\Omega');
0048 legend(sLegend,'Location','EastOutside');
0049

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)