; ; dar ; plot wedge results ; dif = MeasureRad - fitRadius ; meanar[] for wedge is mean of dif over about about 60 points ; rmsAr[] is the rms of dif over the 60 points of each cell.. this is the individual rms's over each cell ; meanAr9[] is the meanar averaging the means of the 9 measurements ; gen .png files ; wedge_loc1,png xy ,yz converage ; wedge_loc2.png blowup showing the points in the grid ; ; plot the x,y coverage for the wedge ; wedge_azel goto,plotit0 goto,plotit2 goto,plotit1 xyz=blmscale(dar[0].hdr,(*dar[0].pd)) rtp=blmxyztosph(xyz,/deg,/cwy) xyz9=blmscale(dar[8].hdr,(*dar[8].pd)) rtp9=blmxyztosph(xyz9,/deg,/cwy) ; ; show the spacing in the samples ; plotit0: if hard then pscol,'wedge_azel.ps',/full !p.multi=[0,1,3] cs=2.2 font=1 csn=1.5 xtit='Az [deg]' ytit='El [deg]' tit='11mar20 scan10 az vs el sampled positions for 1 az deg' ver,0,20 hor,-5,-4 plot,rtp[1,*],rtp[2,*],psym=3,$ chars=cs,font=font,$ xtit=xtit,ytit=ytit,$ tit=tit hor,-4.8,-4.6 tit='Blowup in az' plot,rtp[1,*],rtp[2,*],psym=3,$ chars=cs,font=font,$ xtit=xtit,ytit=ytit,$ tit=tit ; linear fit to each section az0=-4.8 daz=.01794d deg=1 slpAr=fltarr(11) for i=0,10 do begin &$ aa=az0 + daz*i &$ ii=where((rtp[1,*] ge aa) and (rtp[1,*] lt aa+daz) and $ (rtp[2,*] ge 3) and (rtp[2,*] le 20),cnt) &$ coef=poly_fit(rtp[1,ii],rtp[2,ii],deg,yfit=yfit) &$ slpAr[i]=coef[1] &$ oplot,rtp[1,ii],yfit,col=colph[2] &$ endfor x0=-4.76 y0=1. xyouts,x0,y0,'LinearFit to get slope dEl/dAz',chars=csn,font=font,col=colph[2] hor,0,12. ver,0,.1 xtit='11 elevation strips' ytit='az Deg per rotation' tit='deltaAz per 360 deg El rotation.' xx=findgen(11)+1 plot,xx,1./slpar * 360.,psym=-1,$ chars=cs,font=font,$ xtit=xtit,ytit=ytit,$ tit=tit oplot,[1,11],[1,1]*daz,col=colph[3] x0=2 y0=.065 xyouts,x0,y0,'From 11 linear fits',chars=csn,font=font,col=colph[1] x0=2 y0=.025 xyouts,x0,y0,'From az spacing of el strips. daz=.0179 deg',chars=csn,font=font,col=colph[3] if hard then hardcopy x ldcolph stop hor,-4.8,-4.6 ver,10,10.1 plot,rtp[1,*],rtp[2,*],psym=1,$ chars=cs,font=font,$ xtit=xtit,ytit=ytit,$ tit=tit za=(90 - findgen(20)+1) print,sin(za*!dtor) ; ; compute some rates. ; azTot=15. daz=.01794 ; per rotation totTm=(53.*60 + 57)* azTot/360. ; from usr manual but only did 15 az deg nelstrip=long(azTot/daz + .5) tmStrip=totTm/nelstrip elFrq=1./tmstrip ; !p.multi=0 ; ii=where((xyz[0,*] lt wi.xrange[0]) or (xyz[0,*] gt wi.xrange[1]) or $ (xyz[1,*] lt wi.yrange[0]) or (xyz[1,*] gt wi.yrange[1]) or $ (xyz[2,*] lt wi.zlim[0]) or (xyz[2,*] gt wi.zlim[1]) or $ (rtp[1,*] lt wi.azrange[0]) or (rtp[1,*] gt wi.azrange[1]) or $ (rtp[2,*] lt wi.elrange[0]) or (rtp[2,*] gt wi.elrange[1]),cnt) ok=intarr(dar[0].npnts)+1 ok[ii]=0 iig=where(ok eq 1) ; grab grid from last scan for comparison ii9=where((xyz9[0,*] lt wi.xrange[0]) or (xyz9[0,*] gt wi.xrange[1]) or $ (xyz9[1,*] lt wi.yrange[0]) or (xyz9[1,*] gt wi.yrange[1]) or $ (xyz9[2,*] lt wi.zlim[0]) or (xyz9[2,*] gt wi.zlim[1]) or $ (rtp9[1,*] lt wi.azrange[0]) or (rtp9[1,*] gt wi.azrange[1]) or $ (rtp9[2,*] lt wi.elrange[0]) or (rtp9[2,*] gt wi.elrange[1]),cnt) ok=intarr(dar[8].npnts)+1 ok[ii9]=0 iig9=where(ok eq 1) plot,xyz9[0,iig9],xyz9[1,iig9],psym=3 plotit1: ; use import png:wedge_loc.png ;if hard then pscol,'wedge_loc.ps',/full !p.multi=[0,2,1] cs=2.0 csn=1.5 hor,-30,15 ver,0,165 xtit='x [meters]' ytit='y [meters]' tit='11mar20 xy coverage of wedge (scan 10)' chth=2. plot,xyz[0,*],xyz[1,*],psym=3,$ chars=cs,$ charth=chth,$ xtit=xtit,ytit=ytit,$ tit=tit oplot,xyz[0,iig],xyz[1,iig],psym=3,col=colph[3] ; ver,0,55 hor,0,165 ytit='z meters' xtit='y meters' ytit='z meters' tit='yz coverage of wedge' plot,xyz[1,*],xyz[2,*],psym=3,$ ;plot,xyz[0,*],rtp[0,*],psym=3,/iso,$ chars=cs,$ charth=chth,$ xtit=xtit,ytit=ytit,$ tit=tit oplot,xyz[1,iig],xyz[2,iig],psym=3,col=colph[3] xp=.04 ln=3 note,ln,"grid used",chars=csn,col=colph[3],xp=xp ;if hard then hardcopy ;x ;ldcolph stop ; import png:wedge_loc1.png ; ; show blowup of grid plotit2: !p.multi=0 hor,-2.1,0 ver,64.9,67 ;;hor,-2.1,-2.0 ;;ver,65.5,65.8 sym=1 xtit='x [meters]' ytit='y [meters]' tit ='2x2 meter blowup showing x,y samples & grid bins (scan 10,18). C=cnts,A(mm)=avg(Meas-Fit),R(mm)=rms(Meas-Fit) in bin.' plot,xyz[0,iig],xyz[1,iig],psym=sym,$ chars=cs,charth=chth,$ xtit=xtit,ytit=ytit,$ tit=tit oplot,xyz9[0,iig9],xyz9[1,iig9],psym=sym,col=colph[2] ls=0 eps=.1 yeps=.04 scl=1000. for i=0,wi.ny do $ oplot,wi.xrange,[1,1]*(wi.yrange[0] + i*wi.stp),col=colph[3],linestyle=ls for i=0,wi.nx-1 do $ oplot,[1,1]*(wi.xrange[0]+i*stp),wi.yrange,col=colph[3],linestyle=ls for ix=0,wi.nx-1 do begin &$ x0=wi.xrange[0] + ix*stp + stp*.05 &$ if (x0 gt -2.1) and (x0 lt 0) then begin &$ for iy=0,wi.ny-1 do begin &$ y0=wi.yrange[0] + iy*stp + stp*.5 &$ if (y0 gt 64.9) and (y0 lt 67.0) then begin &$ lin=string(format='("scn10:C,A,R:",i3,",",f5.2,",",f5.2)',$ wr[0].cntar[ix,iy], wr[0].avgar[ix,iy]*scl, wr[0].rmsar[ix,iy]*scl) &$ xyouts,x0,y0+yeps,lin,chars=csn,col=colph[5] &$ lin=string(format='("scn18:C,A,R:",i3,",",f5.2,",",f5.2)',$ wr[8].cntar[ix,iy], wr[8].avgar[ix,iy]*scl, wr[8].rmsar[ix,iy]*scl) &$ xyouts,x0,y0-2*yeps,lin,chars=csn,col=colph[5] &$ endif &$ endfor &$ endif &$ endfor ln=28.2 xp=.6 scl=.7 csnn=2. note,ln ,"+ Scan10",chars=csnn,xp=xp,col=colph[1] &$ note,ln+1*scl,"+ Scan18",chars=csnn,xp=xp,col=colph[2] stop ; import png:wedge_loc2.png ; ; plot the rms over each grid ; ; ; look at intensitiy vs positions ; ; 1 az strip jj=where((rtp[1,*] ge 0.038) and (rtp[1,*] le .04659)) sym=-1 plot,rtp[1,jj],inten[jj],psym=sym hor,0,160 plot,rtp[0,jj],inten[jj] hor,0,20 plot,rtp[2,jj],inten[jj],psym=sym plot,rtp[0,*],inten,psym=3 plot,rtp[1,*],inten,psym=3 hor ver plot,rtp[1,ii],rtp[0,ii],psym=3 !p.multi=0 hor,0,20 plot,rtp[2,*],inten,psym=3 hor plot,rtp[0,*] plot,rtp[1,*] plot,rtp[2,*] hor del=2e4 i0=2e5 i1=i0 + del plot,xyz[0,i0:i1],xyz[1,i0:i1],psym=3 plot,xyz[0,i0:i1] plot,rtp[0,i0:i1] plot,rtp[1,i0:i1],rtp[2,i0:i1],psym=3 n=n_elements(wr) scl=1000. aa=dblarr(2,n) for i=0,n-1 do begin &$ aa[*,i]=rms(wr[i].rmsar*scl,/quiet) &$ lin=string(format='(i2," avg cnts/cell:",i3," mean:",f7.3," rms:",f7.3)',$ i,mean(wr[i].cntar),aa[*,i]) &$ print,lin &$ endfor ; x=findgen(n)+1 hor,0,n ver,0,.002*scl ploterr,x,reform(aa[0,*])*scl,scl*reform(aa[1,*])/2.,psym=1 hor,0,32*83 ver,.0,.005 plot,[0,1],[0,1],/nodata for i=0,8 do begin &$ icol=i+1 &$ oplot,wr[i].rmsar,col=colph[icol] &$ endfor ; end