;************************************************************************* ;NAME : hdlpot (procedure) ;FUNCTION : display observation status in the header file ;DATE : 91/09/30, 91/12/25 ;PROGRAMMER : k.i. ; ======================================================================== ;************************************************************************* function flttime,timestr ; timestring (hh:mm:ss) --> float value (h) hh=float(strmid(timestr,0,2)) mm=float(strmid(timestr,3,2)) ss=float(strmid(timestr,6,2)) return,hh + mm/60. + ss/3600. end ;******************************************************************** ;NAME : plothead (procedure) ;FUNCTION : plot 10-cm observation log in header file ;DATE : 1991/10/01 ;PROGRAMMER : k.i. ;******************************************************************** pro plothead,h,fix=fix ; h : array of header structure ; fix: fix x-axis scale, dots / 1 hour ; --------------- get status arrays ------------------- nn=n_elements(h) l0=h.l0 ; solar brighteness gx=h.g_balx ; x- guide balance gy=h.g_baly ; y- guide balance ;sky=h.t_parm(0)-2048 ; sky intensity in PIP4000 sky=h.t_parm(0)/100 ; sky intensity after dark subtraction ('92/01/07) obj=h.d_parm(5)-2048 ; obj. lens position mode=h.obs_mode ; 1.data, 2.dark, 3.flat set=h.d_parm(4) ; turret setting t=flttime(h.time1) ; time (hour) from 00:00:00 date="'"+h(0).date1 t0=float(strmid(h(0).time1,0,2)) t1=float(strmid(h(nn-1).time1,0,2))+1.0 if(total(l0)/nn gt 2000) then l0=l0-2048 if(total(gx)/nn gt 1000) then gx=gx-2048 if(total(gy)/nn gt 1000) then gy=gy-2048 ; ---------------- modify color table ------------------ r=[0,1,1,0,0,1,1,0] ; 0.black 3.green 6.purple g=[0,1,0,1,0,1,0,1] ; 1.white 4.blue 7.light blue b=[0,1,0,0,1,0,1,1] ; 2.red 5.yellow ncolor=!d.n_colors tvlct,ncolor*r,ncolor*g,ncolor*b ; ---------------- plotting initial routine ---------------------- wy=620 x0m=70. & x1m=70. ; left & right mergin of x in device unit y0m=50. & y1m=70. ; " y win_x=float(!d.x_size) ; window x-size win_y=float(!d.y_size) ; window y-size if keyword_set(fix) then begin ; x0 ~ y1 normal unit dx=fix ; x-length of 1 hour in device unit win_x_fix=x0m+x1m+(t1-t0)*dx if(win_x_fix gt win_x) then begin ; open a larger window win_x=win_x_fix ;device,get_screen_size=ws ws=[1100,900] window,xpos=0,ypos=ws(1)-wy,xsize=win_x,ysize=win_y, $ title='obs10c_hed' endif x0=x0m/win_x & x1=x0+(t1-t0)*dx/win_x y0=y0m/win_y & y1=(win_y-y1m)/win_y wx=x1-x0 & wy=y1-y0 endif else begin x0=x0m/win_x & x1=(win_x-x1m)/win_x y0=y0m/win_y & y1=(win_y-y1m)/win_y wx=x1-x0 & wy=y1-y0 endelse ;posl0=[x0, y0+wy*0.45, x1, y1] ; normal coordinate ;posgx=[x0, y0+wy*0.25, x1, y0+wy*0.4] ;posgy=[x0, y0+wy*0.1, x1, y0+wy*0.25] ;posob=[x0, y0, x1, y0+wy*0.1] posl0=[x0, y0+wy*0.6, x1, y1] ; normal coordinate possk=[x0, y0+wy*0.3, x1, y0+wy*0.6] posgx=[x0, y0+wy*0.2, x1, y0+wy*0.3] posgy=[x0, y0+wy*0.1, x1, y0+wy*0.2] posob=[x0, y0, x1, y0+wy*0.1] ; ---------------- plotting routine ---------------------- plot,[x0,x1,x1,x0,x0],[y0,y0,y1,y1,y0],pos=[0,0,1,1], $ xstyle=1+4,ystyle=1+4,xrange=[0,1],yrange=[0,1],color=1 plot,t,l0,/nodata,color=1, $ ; ----- l0 ----- pos=posl0,charsize=1.2,/noerase, $ ; title='Norikura 10cm CCD coronagraph: '+date, $ xstyle=1,xrange=[t0,t1],xtickname=replicate(' ',fix(t1-t0+1)), $ xticks=fix(t1-t0),xminor=6,xticklen=0.03, $ ystyle=8,ytitle='brighteness',yrange=[0,1500] xyouts,x0,y1+0.08,'!8Norikura 10cm CCD coronagraph ',size=1.4,/normal, $ charthick=1.8 xyouts,x0,y1+0.02,'!3'+date+': '+strcompress(string(nn),/remove_all)+ $ ' images',size=1.5,/normal oplot,t,l0,psym=4,symsize=0.1,color=5 ; '+' symbol skymax=255. ; ----- sky ----- plot,t,sky,/nodata,pos=possk,/noerase,yrange=[0,skymax],ystyle=1+4, $ xstyle=1,xrange=[t0,t1],xtickname=replicate(' ',fix(t1-t0+1)), $ xticks=fix(t1-t0),xminor=6,xticklen=0.03 axis,yax=1,ystyle=1,ytitle='sky',yrange=[0,skymax],color=1 oplot,t(where(mode eq 2)),sky(where(mode eq 2)), $ psym=4,symsize=0.1,yrange=[0,skymax],color=2 ii=where((set eq 0) and (mode eq 1)) if( ii(0) ne -1 ) then $ oplot,t(ii),sky(ii),psym=4,symsize=0.1,color=6 ii=where((set eq 1) and (mode eq 1)) if( ii(0) ne -1 ) then $ oplot,t(ii),sky(ii),psym=4,symsize=0.1,color=4 ii=where((set eq 2) and (mode eq 1)) if( ii(0) ne -1 ) then $ oplot,t(ii),sky(ii),psym=4,symsize=0.1,color=7 ii=where((set eq 3) and (mode eq 1)) if( ii(0) ne -1 ) then $ oplot,t(ii),sky(ii),psym=4,symsize=0.1,color=3 plot,t,gx,/nodata,color=1, $ ; ----- gx ----- pos=posgx,charsize=1.2,/noerase, $ xstyle=1+4,xrange=[t0,t1], $ ytitle='gx',yrange=[-500,500],yticks=2,yminor=2 oplot,[t0,t1],[0,0],color=1 oplot,t,gx,psym=1,symsize=0.1,color=2 plot,t,gy,/nodata,color=1, $ ; ----- gy ----- pos=posgy,charsize=1.2,/noerase, $ xstyle=1+4,xrange=[t0,t1], $ ytitle='gy',yrange=[-500,500],yticks=2,yminor=2 oplot,[t0,t1],[0,0] oplot,t,gy,psym=1,symsize=0.1,color=2 plot,t,obj,/nodata,color=1, $ ; ----- obj ----- pos=posob,charsize=1.2,/noerase, $ xstyle=1+8,xrange=[t0,t1], $ xtitle='time (JST)', $ xticks=fix(t1-t0),xminor=6,xticklen=0.1, $ ytitle='obj',ystyle=1,yrange=[1400,1600],yticks=2 oplot,t,obj,psym=1,symsize=0.1,color=6 return end ;************************************************************************* ;NAME : hdplot (procedure) ;************************************************************************* pro hdplot,var=var,file=file,h=h ; var : if set x-scale is variable ; file : header filename, if set print to pcpr and return on_ioerror,lab1 dx=60 ; x-scale, dots / 1 hour ;device,get_screen_size=ws ws=[1100,900] wx=600 ; display window size wy=600 if n_elements(file) eq 0 then $ window,xpos=0,ypos=ws(1)-wy,xsize=wx,ysize=wy ;----------- get header file information ---------------- hddir='/data/obs10/hed' hddir='/solar/norikura/corona/hed' cans='' print,format='("enter header file directory ( default=",A," ) ",$)',hddir read,cans if cans ne '' then hddir=cans i=1 loop: print,'select data from menu' if n_elements(file) eq 0 then begin hdfile=lsmenu(hddir,ret=['print','exit'],init=i,x=800,y=50) if( hdfile eq 'exit' ) then stop if( hdfile eq 'print' ) then goto,printout hdfile=hddir+'/'+hdfile endif else begin hdfile=file(0) endelse spawn,'filesize '+hdfile,ss nn=fix(long(ss(0))/512l) print,nn,' headers counted' if(nn eq 1) then begin print,'only 1 header!!' goto,loop endif h1=nkrhead() h=replicate(h1,nn) openr,1,hdfile readu,1,h close,1 if(h(0).one eq 256) then begin for i=0,nn-1 do begin h1=h(i) hswab,h1 h(i)=h1 endfor endif if n_elements(file) ge 1 then goto,printout if keyword_set(var) then plothead,h $ else plothead,h,fix=dx goto,loop printout: print,'printing out ------' set_plot,'ps' device,/landscape,xoffset=3,yoffset=26,ysize=13 ; x -> vertical, y -> horizontal (long side) if keyword_set(var) then plothead,h $ else plothead,h,fix=dx*30 device,/close spawn,'lpr -h idl.ps' set_plot,'x' if n_elements(file) ge 1 then return goto,loop lab1: print,'file_io error' end