;---------------------------------------------------------------------- ;1. how much does the 3cm shorter radius affect the errors. ; - assume dish has radiusRef -3cm ; - compute the radii assuming the center is at the correct position. ; - then compute the errors from the correct radius ; ;goto,plotit1 nodata=-999d diameter=305d ; radiusRef=265.176d cenRef=[0d,0d,radiusRef] ; RerrAr=[-.03,-.07] ; 3,7 cm short if hard then pscol,'lossRadiusShort.ps',/full for k=0,n_elements(rerrAr) - 1 do begin rerr=rerrAr[k] radiusE =radiusRef + rerr cenE=[0d,0d,radiusRef + rerr] gridlen=1000l ; ; generate grid for error ; ftom=.3048d mtof=1D/ftom rms=0d n=genrefxyz(gridlen,cenE,radiusE,diameter,rms,xyzN,nodata=nodata,/grid) xyzN=reform(xyzn,3,gridlen*gridlen) ; ; goto spherical coord suing referecne center ; ii=where(xyzN[2,*] ne nodata) jj=where(xyzN[2,*] eq nodata) rtp=blmxyztosph(xyzN,center=cenRef,/deg) ; radErrCm=(rtp[0,*] - radiusRef) * 100d radErrCm[jj]=nodata ; xyrad=reform(sqrt(xyzn[0,*]^2 + xyzN[1,*]^2)) ; lambdaArcm=[21.,12.6,6.,3.] radErrCm=reform(raderrCm,gridlen,gridlen) rmsRefCm=0d ; perfect sphere xxf=reform(xyzn[0,*]*mtof,gridlen,gridlen) yyf=reform(xyzn[1,*]*mtof,gridlen,gridlen) x0f=0d y0f=0d istat=gainlosscmp(radErrCm,xxf,yyf,x0f,y0f,lambdaArcm,giarC,$ rmsRefCm=rmsRefCm,nodataval=nodata) ; goto edge of dish x0f=500. - 225/2.*mtof istat=gainlosscmp(radErrCm,xxf,yyf,x0f,y0f,lambdaArcm,giarE,$ rmsRefCm=rmsRefCm,nodataval=nodata) ; ; ; ; plot radial error vs radius ; !p.multi=[0,1,2] cs=1.4 font=1 ; hor,-10,155 if k eq 0 then begin ver,-.6,.1 endif else begin ver,-1.5,.1 endelse xtit='xy radial distance [m]' ytit='radial error [cm]' lrerr=string(format='(f3.1)',abs(rerr)*100.) tit='Radial error vs xy radius if dish radius ' + lrerr + 'cm short' ; just take a cut through middle, or plot gets too big xx=(reform(xyrad,gridlen,gridlen))[500,*] yy=(reform(radErrcm,gridlen,gridlen))[500,*] plot,xx,yy,psym=3,$ chars=cs,font=font,$ xtit=xtit,ytit=ytit,$ tit=tit ln=2 xp=.4 note,ln,"Using 225m spherical beam",chars=csn,font=font,xp=xp scl=.7 note,ln+1*scl,"Err < 0 --> dish radius too short",chars=csn,font=font,xp=xp ln=10 note,ln,"Assumes perfect surface",chars=csn,font=font,xp=xp flag,[0],col=colph[2] flag,[39.9],col=colph[4] x0=0 y0=-.4 xyouts,x0,y0,'Beam centered at za=0deg',chars=csn,font=font,col=colph[2] x0=41 y0=(k eq 0)?-.5: -.6 xyouts,x0,y0,'Beam centered at za=8.7deg (40meters offset)',chars=csn,font=font,col=colph[4] ; ; c=3e8 frq=C/(giarc.lambdacm*.01) *1e-9 if k eq 0 then ver,-.5,0 if k eq 1 then ver,-2.,0 hor,0,11. xtit='Freq [GHz]' ytit='gain loss [db]' tit='Gain loss Vs Freq (if radius ' + lrerr + 'cm short)' plot,frq,alog10(giarc.gainloss)*10.,psym=sym,$ /nodata,$ chars=cs,font=font,$ xtit=xtit,ytit=ytit,$ tit=tit oplot,frq,alog10(giarc.gainloss)*10.,psym=sym,col=colph[2] oplot,frq, alog10(giare.gainloss)*10.,col=colph[4],psym=sym endfor if hard then hardcopy x ldcolph end