Home > matutils > sza_apfield.m

sza_apfield

PURPOSE ^

field=sza_apfield(r,diameter)

SYNOPSIS ^

function field=sza_apfield(r,diameter)

DESCRIPTION ^

 field=sza_apfield(r,diameter)

 Design aperture field of SZA feeds - truncated Gaussian

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function field=sza_apfield(r,diameter)
0002 % field=sza_apfield(r,diameter)
0003 %
0004 % Design aperture field of SZA feeds - truncated Gaussian
0005 
0006 % Diameters default to actual sizes
0007 if(~exist('diameter'))
0008   diameter=3.5;
0009 end
0010 
0011 if(length(diameter)==1)
0012   diameter(2)=0.35;
0013 end
0014 
0015 % dB down in power at edge of dish
0016 dB=-11.6;
0017 
0018 % Corresponding Gauss prob rel to peak of 1
0019 p=10^(dB/10);
0020 
0021 % Electric field is sqrt of power
0022 p=sqrt(p);
0023 
0024 % Find x val for this on Gauss curve with sigma=1
0025 % Probably a better way to do this...
0026 x=0:0.01:10;
0027 y=gauss([1,0,1],x);
0028 x=interp1(y,x,p,'cubic');
0029 
0030 % Sigma to p at dia
0031 s=(diameter(1)/2)/x;
0032 
0033 % Calc app field values
0034 field=gauss([1,0,s],r);
0035 
0036 % Zero beyond dish edge
0037 field(r>diameter(1)/2)=0;
0038 
0039 % Zero where shadowed by secondary
0040 % turn this off - due to coarse resolution in beam calc shadowed area
0041 % is bigger than proper...
0042 field(r<diameter(2)/2)=0;
0043 
0044 return

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005