pro testarrow,crn,drcsfbr,bx,by,bz,bb,azi,inc,SINL=sinl ; Get Br,Bth and Bph scrn=strtrim(crn,2) phof='/scr20/xuepu/scr221/WSOBLSC/phof/WSO.'+scrn ghf_phof06,phof,22,ga,ha,'ghf_'+scrn,/wso sb_ss06,1.0,22,2.5,1.001,72,30,ga,ha,drcsfbr,drcsfbt,drcsfbp print,'MAX and MIN Br:',max(drcsfbr),min(drcsfbr) ;ghf_phof06,phof,18,ga,ha,'ghf_'+scrn,/wso ;sb_ss06,1.0,18,2.5,1.001,72,30,ga,ha,drcsfbr,drcsfbt,drcsfbp ; Get Bx,By,Bz and Btotal, Azimuthal, Inclination sz=SIZE(drcsfbr) & xsz=sz(1) & ysz=sz(2) zgrid,xsz,ysz,phd,thd,lad,cth,sth ;thd is co-latitude phr=phd*!DTOR & sph=SIN(phr) & cph=COS(phr) bx=fltarr(xsz,ysz) & by=bx & bz=bx ;X-Toward the Earth bb=bx & azi=bx & inc=bx for ix=0,xsz-1 do begin sphi=sph(ix) & cphi=cph(ix) for jy=0,ysz-1 do begin sthj=sth(jy) & cthj=cth(jy) brij=drcsfbr(ix,jy) btij=drcsfbt(ix,jy) bpij=drcsfbp(ix,jy) bx(ix,jy)=brij*sthj*cphi+btij*cthj*cphi-bpij*sphi by(ix,jy)=brij*sthj*sphi+btij*cthj*sphi+bpij*cphi bz(ix,jy)=brij*cthj-btij*sthj bb(ix,jy)=SQRT(bx(ix,jy)^2.0+by(ix,jy)^2.0+bz(ix,jy)^2.0) azi(ix,jy)=ATAN(by(ix,jy)/ABS(bx(ix,jy)))/!DTOR bv=SQRT(bx(ix,jy)^2.0+by(ix,jy)^2.0) inc(ix,jy)=ATAN(bz(ix,jy)/bv)/!DTOR endfor endfor print,MAX(azi),MIN(azi) print,MAX(inc),MIN(inc) tek_color psout,012,'WSOphof_'+scrn+'.ps' bla=readwsosc(phof,/cali) pcontour_brf06,bla,'WSO'+scrn+' Bl',/clr,/bra sc_annot06,1 psdone print,'WSOphof_'+scrn+'.ps' psout,062,'testarrow1_'+scrn+'.ps' !p.multi=[0,2,3,0,1] pcontour_brf06,drcsfbr,'Br',/clr,/bra sc_annot06,1 pcontour_brf06,drcsfbt,'Bth',/clr,/bra sc_annot06,1 pcontour_brf06,drcsfbp,'Bph',/clr,/bra sc_annot06,1 pcontour_brf06,bx,'Bx',/clr,/bra sc_annot06,1 pcontour_brf06,by,'By',/clr,/bra sc_annot06,1 pcontour_brf06,bz,'Bz',/clr,/bra sc_annot06,1 !p.multi=1 psdone print,'testarrow1_'+scrn+'.ps' psout,012,'testarrow2_'+scrn+'.ps' xy_pt,phd,lad,xx,yy phd=phd-180 contour,drcsfbr,phd,lad,xrange=[-180,180],yrange=[-90,90],xsty=5,ysty=5,levels=[-100,0,100],c_thick=[3,5,3],c_lines=[0,0,0],c_color=[2,0,4],title='CR'+scrn+' Br contours (red:-100, black:0, blue:+100) and Total B vector' sc_annot06,1 mxb=MAX(bb) & mnb=MIN(bb) dbb=2*SQRT(2)*5./mxb for i=0,xsz-1 do begin phi=phd(i) for j=0,ysz-1 do begin laj=lad(j) bbij=bb(i,j) x0=phi & y0=laj aziij=azi(i,j) incij=inc(i,j) angr=ATAN(-incij/ABS(aziij)) sn=SIN(angr) cn=COS(angr) x1=x0+bbij*dbb*cn y1=y0+bbij*dbb*sn arrow,x0,y0,x1,y1,hsize=-1/3.,/solid,/data endfor endfor psdone print,'testarrow2_'+scrn+'.ps' end