PRO ADRIDL_4 ; ; Version 4 - correction for horizontal strips included ; Spectroheliograms and DOPPLERGRAM calculation ; H-alpha wings +/- 0.5 A included ; ;ADRIDL_4 - Main level control program for the Coimbra spectroheliograms processing. ; Written in IDL 6.2. Provides a graphic window for program controls. ; ; Copyright M. Klvana and M. Sobotka, ASU AVCR Ondrejov, Czech Rep., 2017 ;**************************************************** progver='ADRIDL 4.0' ;program version name progdir='C:\ADRIDL4_DIR' ;directory for programs archdir='C:\12B_ARCH' ;parent input data directory ;parent output data directory is set in DIG_MAIN4 ;***************************************************** cd, progdir ;program directory setting runmode=0 ; initial scre=get_screen_size() device,cursor_standard=32512 wdelete,0 restore,'banner.sav' window,3,xsiz=scre(0),ysiz=scre(1)-50 limi=fix([scre(0)/4,scre(0)/2,3*scre(0)/4]) sca=scre(0)/1680. pp1=fix(sca*70) pp2=limi(0)+fix(sca*45) pp3=limi(1)+fix(sca*70) pp4=limi(2)+fix(sca*150) curs: tv,congrid(banner,scre(0),scre(1)-50) plots,[0,scre(0)],[100,100],/device plots,[limi(0),limi(0)],[0,100],/device plots,[limi(1),limi(1)],[0,100],/device plots,[limi(2),limi(2)],[0,100],/device xyouts,pp1,35,'SINGLE RUN',/device,charsiz=3,charthick=3 xyouts,pp2,35,'MULTIPLE RUN',/device,charsiz=3,charthick=3 xyouts,pp3,40,'RUN CORRECTIONS',/device,charsiz=2,charthick=2 xyouts,pp4,30,'EXIT',/device,charsiz=4,charthick=4 xyouts,60,130,'Version: '+progver,/device,charsiz=3,charthick=3 oldrun=runmode cursor,x,y,/device,/down if y gt 100 then goto,curs if x le limi(0) then begin runmode=1 ;single run mere=Dialog_pickfile(path=archdir,/directory) endif if x gt limi(0) and x le limi(1) then begin runmode=2 ;multiple run pa=Dialog_pickfile(path=archdir,/directory) parent=strmid(pa,0,strlen(pa)-9) mere=findfile(parent+'*.*') ;mere is a string array here endif if x gt limi(1) and x le limi(2) then runmode=3 ;single run with corrections if x gt limi(2) then goto,fin if runmode eq 1 then begin erase xyouts,60,130,'Processing a single measurement: '+mere+' Wait please...', $ /device,charsiz=2,charthick=2 DIG_MAIN4,progver,mere,sphe,sphg,sphcor,spgcor,doppl, $ sphe1,sphe2,sph1cor,sph2cor, $ coel_stat,ydiam,ydiamc,runmo=runmode goto,curs endif if runmode eq 2 then begin w=where(strlen(mere(*))-strlen(parent) eq 9,n) if n ge 1 then begin mere=mere(w) for i=0,n-1 do begin erase xyouts,60,130,'Processing measurement '+strtrim(i+1,2)+' of '+strtrim(n,2)+': '+mere(i)+' Wait please...', $ /device,charsiz=2,charthick=2 DIG_MAIN4,progver,mere(i),sphe,sphg,sphcor,spgcor,doppl, $ sphe1,sphe2,sph1cor,sph2cor, $ coel_stat,ydiam,ydiamc,runmo=runmode endfor goto,curs endif else begin erase xyouts,60,130,'No files found for multiple run', $ /device,charsiz=2,charthick=2 wait,5 goto,curs endelse endif if runmode eq 3 then begin erase if oldrun eq 1 or oldrun eq 3 then begin xyouts,60,130,'Processing a single measurement: '+mere+' with corrections', $ /device,charsiz=2,charthick=2 DIG_MAIN4,progver,mere,sphe,sphg,sphcor,spgcor,doppl, $ sphe1,sphe2,sph1cor,sph2cor, $ coel_stat,ydiam,ydiamc,runmo=runmode endif else begin xyouts,60,130,'Make a single run first. Returning.',/device,charsiz=3,charthick=3 runmode=0 wait,4 endelse goto,curs endif fin: erase xyouts,150,450,progver+' was written in October 2017 by Mirek Klvana and Michal Sobotka,',/device,charsiz=2,charthick=2 xyouts,150,400,'Astronomical Institute, Czech Academy of Sciences, Ondrejov',/device,charsiz=2,charthick=2 wait,3 wdelete,3 END