; panel for td 12 ; true directions just reading cursor from qt reader ; x y z ; sw -45.98 -35.191 5.704 ; nw -46.910 -35.838 5.947 ; se -47.088 -33.632 5.693 ; ne -48.045 -34.441 5,980 ; ; same panel at the north end .used the blank spots where the adjusters are. ; west -117.474 -93.531 ; east -118.499 -91.938 ;south ; west 114.994 96.459 ; east 113.438 97.886 ; ; wAr=[$ [-45.98,-35.191],$ [-46.910,-35.838],$ [-117.474,-93.531],$ [ 114.994, 96.459]] ; deg=1 ii=sort(war[0,*]) coef=poly_fit(war[0,ii],war[1,ii],deg,yfit=yfit,yband=yband,yerr=yerr) print,coef print,atan(coef[1])*!radeg ; sym=-1 hor,-160,160 ver,-160,160 ;ver,-20,20 ;hor,20,20 plot,war[0,ii],war[1,ii],psym=sym oplot,war[0,ii],yfit,col=colph[2] oplot,[0,0],[-150,150],col=colph[3] oplot,[-150,150],[0,0],col=colph[3] ; i=rdcur(icur) ; let Cp be the scanner coord syst ; let C be the normal north,south etc coord . th=atan(coef[1])*!radeg ; th is CW relative to xp axis ; rotating by +th will put the xp axis along the -y axis ; rotating by +90 more will move the xp axis to the + xaxis th+=90d ; th=129.25996 ; ; rotVec will rotate a vector one way and the coord system the opposite way. xyzr=rotvec(xyz,-th) ; ; ; ; wuse,0 hor,-150,150 ver,-150,150 plot,xyzr[0,*],xyzr[1,*],psym=3 flag,[ ; wuse,1 xx=(findgen(100)/100. - .5) * 300 yy=poly(xx,coef) plot,xyz[0,*],xyz[1,*],psym=3 oplot,xx,yy,col=colph[2] ; xy=fltarr(2,100) xy[0,*]=xx xy[1,*]=yy xyR=rotvec(xy,-th) oplot,xyR[0,*],xyR[1,*],col=colph[4]