pro synchmap_bcomp,sdate,stime,obs,mdl,updsc0,orgsf,drcsc,drcsf,xx1=xx1,YY1=yy1,LOW=low,FIRST=first,LEFT=left,SNOG=snog,PEVT=pevt,DISP=disp if n_params( ) lt 1 then begin print,'pro synchmap_bcomp,sdate,stime,obs,mdl,updsc0,orgsf,drcsc,drcsf,' print,' xx1=,yy1=,/low,/first,/left,/snog(/pevt),/disp' print,"sdate='1998.05.23' & stime='16:03:30'" print,"sdate='2002.08.27' & stime='14:35:20'" print,"xx1=40 in deg, yy1=10 in pixel" print,"mdl: 'Br'; /low->360x180 for MDI" print,"Note:magnetogram and synoptic map must have same spatial resolution" return endif ; 1. Data source if obs eq 'MDI' then begin ; Get remapped-MDI-MG files using sdate if keyword_set(first) then mkremapmmg,sdate,remapmmgf,/first $ else mkremapmmg,sdate,remapmmgf ; Specify 5 Carringtom-maps files with same spacial resolution as the magnetogram crncl0_time_ctimes,sdate,stime,scrn0,scl0 crn=FIX(scrn0) scrnr1=strtrim(crn-1,2) & scrnr2=strtrim(crn-2,2) scrnl1=strtrim(crn+1,2) & scrnl2=strtrim(crn+2,2) CASE 1 OF mdl eq 'Bl': begin ; xsz=3600 scfr2='/home3/xudong/POLCORR/synop/synop_Mr_0.polfil.'+scrnr2+'.fits' scfr1='/home3/xudong/POLCORR/synop/synop_Mr_0.polfil.'+scrnr1+'.fits' scf0='/home3/xudong/POLCORR/synop/synop_Mr_0.polfil.'+scrn0+'.fits' scfl1='/home3/xudong/POLCORR/synop/synop_Mr_0.polfil.'+scrnl1+'.fits' scfl2='/home3/xudong/POLCORR/synop/synop_Mr_0.polfil.'+scrnl2+'.fits' end mdl eq 'Br': begin ; xsz eq 360 scfr2='/scr20/xuepu/MDIBRSC/phof360_type1/br360_'+scrnr2+'.fits' scfr1='/scr20/xuepu/MDIBRSC/phof360_type1/br360_'+scrnr1+'.fits' scf0='/scr20/xuepu/MDIBRSC/phof360_type1/br360_'+scrn0+'.fits' scfl1='/scr20/xuepu/MDIBRSC/phof360_type1/br360_'+scrnl1+'.fits' scfl2='/scr20/xuepu/MDIBRSC/phof360_type1/br360_'+scrnl2+'.fits' end else: ENDCASE endif ; if obs eq 'HMI' then begin ; CASE 1 OF ; mdl eq 'Bl': begin ; Get remapped-MDI-MG files using sdate ; Call L3 (high resolution) or L4 (low resolution) using sdate, stime to get files of remapped magnetogram ; Specify 5 Carringtom-maps files with same spacial resolution as the magnetogram ; crncl0_time_ctimes,sdate,stime,scrn0,scl0 ; crn=FIX(scrn0) & cl0=FLOAT(scl0) ; Call L5 using crn to get B-los Carrington maps of crn-2,crn-1,crn, ; crn+1 or crn+2 to constract updted Carrington maps needed in ; correcting the effect of differential rotation => L6 or L7 ; mdl eq 'Br': begin ; Get remapped-MDI-MG files using sdate ; Call V10 (high resolution) or V9 (low resolution) using ; sdate, stime to get files of selected remapped magnetogram of ; Br,Bt,Bp ; Specify 5 Carringtom-maps files with same spacial resolution as the magnetogram ; crncl0_time_ctimes,sdate,stime,scrn0,scl0 ; crn=FIX(scrn0) & cl0=FLOAT(scl0) ; Call V11 using crn to get Br (Bt,Bp) Carrington maps of crn-2, ; crn-1,crn,crn+1,orcrn+2 to constract updted Carrington map ; => V12,V13,V14 ; end ; mdl eq 'Bth': begin ..., end ; mdl eq 'Bph': begin ..., end ; else: ; endif ;2. Get the array of usable remapped magnetogram data and its half width, ; i.e. good_mgbra and hwd if obs eq 'MDI' then begin if keyword_set(low) then $ mmgbra_remapmmgf,remapmmgf,stime,mmgbra,B0,cl0,crn,t_obs,/low $ else mmgbra_remapmmgf,remapmmgf,stime,mmgbra,B0,cl0,crn,t_obs endif sz=SIZE(mmgbra) xmg=sz(1) & ymg=sz(2) ; in pixels ppdx=xmg/180. if not keyword_set(xx1) then xx1=40*ppdx else xx1=xx1*ppdx ; 40 in deg. if not keyword_set(yy1) then yy1=10 ; 10 in pix. xx2=xmg-xx1 & yy2=ymg-yy1 ; xx2,yy2 in pixels*** good_mgbra=mmgbra(xx1:xx2,yy1:yy2) szgm=size(good_mgbra) xgmr=szgm(1) hwd=90-xx1/ppdx ; hwd in degrees ;3. Determine the location of the interested Carrington longitude, itl, in ; the tranditional synoptic map. Get arraies of 4 synoptic charts ; necessary to get 3 updated synoptic maps (updsc0, updscr, updscl) if keyword_set(left) then itl=hwd else itl=180 ; itl in degrees if cl0 gt itl then begin bccmr1=readfits(scfr1,ht,/silent) bccmr2=bccmr1 bccm0=readfits(scf0,ht,/silent) bccml1=readfits(scfl1,ht,/silent) bccml2=readfits(scfl2,ht,/silent) endif else begin bccmr2=readfits(scfr2,ht,/silent) bccmr1=readfits(scfr1,ht,/silent) bccm0=readfits(scf0,ht,/silent) bccml1=readfits(scfl1,ht,/silent) bccml2=bccml1 endelse scrncl0=strtrim(crn,2)+':'+strtrim(cl0,2) ; cl0 in decimal degrees updbccm_crnclog,crn,cl0,itl,bccm0,bccmr1,bccml1,updsc0,updscrnphd0 updbccm_crnclog,crn-1,cl0,itl,bccmr1,bccmr2,bccm0,updscr,updscrnphdr updbccm_crnclog,crn+1,cl0,itl,bccml1,bccm0,bccml2,updscl,updscrnphdl ;4. Get original synoptic frame, orgsf, by merging good_mgbra with updsc0 sz=SIZE(updsc0) & xsm=sz(1) & ysm=sz(2) ; in pixels sitl=STRMID(STRTRIM(itl,2),0,3) orgscf='orgsc_'+sitl+'_'+t_obs+'.fits' writefits,orgscf,updsc0,hd print,orgscf orgsf=updsc0 xx1n=itl*ppdx-xgmr/2 & xx2n=itl*ppdx+xgmr/2 orgsf(xx1n:xx2n,yy1:yy2)=good_mgbra orgsff='orgsf_'+sitl+'_'+t_obs+'.fits' writefits,orgsff,orgsf,hd print,orgsff ;5. Get the synchronic map and frame, i.e., drcsc and drcsf drcsc_updsc20090810b,crn,cl0,itl,updsc0,updscr,updscl,updscrnphd0,updscrnphdr,updscrnphdl,drcsc,longi drcsf=drcsc drcsf(xx1n:xx2n,yy1:yy2)=good_mgbra if keyword_set(pevt) then begin drcscf='drcsc_pevt_'+sitl+'_'+t_obs+'.fits' drcsff='drcsf_pevt_'+sitl+'_'+t_obs+'.fits' endif else begin drcscf='drcsc_snog_'+sitl+'_'+t_obs+'.fits' drcsff='drcsf_snog_'+sitl+'_'+t_obs+'.fits' endelse writefits,drcscf,drcsc,hd writefits,drcsff,drcsf,hd print,drcscf,' ',drcsff if keyword_set(disp) then begin ;6. 2 Figures ; Display scmgbra, updsc0 and orgsf if not keyword_set(mx) then mx=100 tek_color Figure1='orgsf_'+sitl+'_'+t_obs+'.ps' clog=cl0 psout,031,Figure1 !p.multi=[0,1,3] ; Panel 1 xticsm_crnclog09,crn,cl0,itl,xticscb,xticsct xticsm_crnclog09,crn,cl0,itl,xticsfb,xticsft,/sf scmgbra=fltarr(xsm,ysm) scmgbra(xx1n:xx2n,yy1:yy2)=good_mgbra bscmgbra=bytscl(scmgbra,max=mx,min=-mx) pscimg06,bscmgbra,'Construction of Synoptic Frame',px,py,sy='sla' is=0 & ie=359*ppdx & di=10*ppdx for i=is,ie,di do oplot,[i,i],[-1,1] sc_annot06,1,xticb=xticsfb,longi='heliographic',/sinl zgrid,xsm,ysm,phd,thd,lad slat=SIN(lad*!DTOR) yy1s=slat(yy1) & yy2s=slat(yy2) oplot,[itl,itl]*ppdx,[-1,1],thick=5,color=2 oplot,[xx1n,xx1n],[yy1s,yy2s],line=0,color=2 oplot,[xx2n,xx2n],[yy1s,yy2s],line=0,color=2 oplot,[xx1n,xx2n],[yy1s,yy1s],line=0,color=2 oplot,[xx1n,xx2n],[yy2s,yy2s],line=0,color=2 ; Panel 2 bupdsc0=BYTSCL(updsc0,max=mx,min=-mx) pscimg06,bupdsc0,' ',px,py,sy='sla' for i=is,ie,di do oplot,[i,i],[-1,1],color=4 updsc_annot09,1,xticb=xticscb,xtict=xticsct,longi='carrington',/sinl oplot,[itl,itl]*ppdx,[-1,1],thick=5,color=2 oplot,[xx1n,xx1n],[yy1s,yy2s],line=2,color=2 oplot,[xx2n,xx2n],[yy1s,yy2s],line=2,color=2 oplot,[xx1n,xx2n],[yy1s,yy1s],line=2,color=2 oplot,[xx1n,xx2n],[yy2s,yy2s],line=2,color=2 ; Panel 3 borgsf=BYTSCL(orgsf,max=mx,min=-mx) pscimg06,borgsf,' ' ,px,py,sy='sla' for i=is,ie,di do oplot,[i,i],[-1,1],color=4 for i=xx1n,xx2n,di do oplot,[i,i],[yy1s,yy2s],thick=3 updsc_annot09,1,xticb=xticscb,xtict=xticsfb,longi='hybrid',/sinl oplot,[itl,itl]*ppdx,[-1,1],thick=5,color=2 oplot,[xx1n,xx1n],[yy1s,yy2s],line=0,color=2 oplot,[xx2n,xx2n],[yy1s,yy2s],line=0,color=2 oplot,[xx1n,xx2n],[yy1s,yy1s],line=0,color=2 oplot,[xx1n,xx2n],[yy2s,yy2s],line=0,color=2 !p.multi=0 psdone print,'Finished '+Figure1 ; Display scmgbra, drcsc and drcsf tek_color Figure2='drcsf_'+sitl+'_'+t_obs+'.ps' clog=cl0 psout,031,Figure2 !p.multi=[0,1,3] ; Panel 1 xticsm_crnclog09,crn,cl0,itl,xticscb,xticsct xticsm_crnclog09,crn,cl0,itl,xticsfb,xticsft,/sf scmgbra=fltarr(xsm,ysm) scmgbra(xx1n:xx2n,yy1:yy2)=good_mgbra bscmgbra=bytscl(scmgbra,max=mx,min=-mx) pscimg06,bscmgbra,'Construction of Synchronic Frame',px,py,sy='sla' is=0 & ie=359*ppdx & di=10*ppdx for i=is,ie,di do oplot,[i,i],[-1,1] sc_annot06,1,xticb=xticsfb,longi='heliographic',/sinl zgrid,xsm,ysm,phd,thd,lad slat=SIN(lad*!DTOR) yy1s=slat(yy1) & yy2s=slat(yy2) oplot,[itl,itl]*ppdx,[-1,1],thick=5,color=2 oplot,[xx1n,xx1n],[yy1s,yy2s],line=0,color=2 oplot,[xx2n,xx2n],[yy1s,yy2s],line=0,color=2 oplot,[xx1n,xx2n],[yy1s,yy1s],line=0,color=2 oplot,[xx1n,xx2n],[yy2s,yy2s],line=0,color=2 ; Panel 2 bdrcsc=BYTSCL(drcsc,max=mx,min=-mx) pscimg06,bdrcsc,' ',px,py,sy='sla' for i=is,ie,di do oplot,[i,i],[-1,1] updsc_annot09,1,xticb=xticsfb,xtict=xticsct,longi='heliographic',/sinl oplot,[itl,itl]*ppdx,[-1,1],thick=5,color=2 oplot,[xx1n,xx1n],[yy1s,yy2s],line=2,color=2 oplot,[xx2n,xx2n],[yy1s,yy2s],line=2,color=2 oplot,[xx1n,xx2n],[yy1s,yy1s],line=2,color=2 oplot,[xx1n,xx2n],[yy2s,yy2s],line=2,color=2 ; Panel 3 bdrcsf=BYTSCL(drcsf,max=mx,min=-mx) pscimg06,bdrcsf,' ' ,px,py,sy='sla' for i=is,ie,di do oplot,[i,i],[-1,1] for i=xx1n,xx2n,di do oplot,[i,i],[yy1s,yy2s],thick=3 updsc_annot09,1,xticb=xticsfb,xtict=xticsft,longi='heliographic',/sinl oplot,[itl,itl]*ppdx,[-1,1],thick=5,color=2 oplot,[xx1n,xx1n],[yy1s,yy2s],line=0,color=2 oplot,[xx2n,xx2n],[yy1s,yy2s],line=0,color=2 oplot,[xx1n,xx2n],[yy1s,yy1s],line=0,color=2 oplot,[xx1n,xx2n],[yy2s,yy2s],line=0,color=2 !p.multi=0 psdone print,'Finished '+Figure2 endif end