pro synchmap_bvect,sdate,stime,obs,mdl,drcsfbx,drcsfby,drcsfbz,drcsfbv,xx1=xx1,YY1=yy1,LOW=low,FIRST=first,LEFT=left,SNOG=snog,PEVT=pevt,DISP=disp ; Get the three synchronic frames for Br,Bth and Bph synchmap_bcomp,sdate,stime,'HMI','Br',updsc0br,orgsfbr,drcscbr,drcsfbr,/left,/snog synchmap_bcomp,sdate,stime,'HMI','Bth',updsc0bt,orgsfbt,drcscbt,drcsfbt,/left,/snog synchmap_bcomp,sdate,stime,'HMI','Bph',updsc0bp,orgsfbp,drcscbp,drcsfbp,/left,/snog ; 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) ; Longitude from X inc(ix,jy)=ATAN(bz(ix,jy)/bv)/!DTOR ; Latitude endfor endfor end