;+ ; This procedure draws header information on the plot. It is intended ; to be used only by the other gbtidl plotter procedures. It is not ; an end-user procedure. ; ; @keyword dc {in}{optional}{type=data container} data container ; @keyword charsize {in}{optional}{type=float} character size; needed for ps generation ; @keyword label_dc {in}{optional}{type=string} label for DC, shown at ; bottom of plot by time stamp ; @keyword foreground {in}{optional}{type=color}{default=!g.foreground} ; The foreground color. ; @keyword nocolor {in}{optional}{type=boolean}{default=F} When set, ; all fields are printed with the foreground color. When not set (the ; default), some fields are highlighted with color (!green and !red). ; ; @private_file ; ; @version $Id: show_header.pro,v 1.8 2005/05/29 22:44:28 bgarwood Exp $ ;- pro show_header,dc=dc,charsize=charsize,label_dc = label_dc,foreground=foreground, nocolor=nocolor common gbtplot_common,mystate,xarray if (n_elements(dc) eq 0) then dc = !g.s[0] if (n_elements(charsize) eq 0) then charsize=1.4 if (n_elements(dcstring) eq 0) then dcstring=' ' if (n_elements(foreground) eq 0) then foreground=!g.foreground if keyword_set(nocolor) then begin greenHighlight = foreground redHighlight = foreground endif else begin greenHighlight = !green redHighlight = !red endelse xyouts,0.06,0.95,"Scan",/normal,charsize=charsize,color=foreground xyouts,string(dc.scan_number,format='(I5)'),charsize=charsize,color=highlight xyouts,0.06,0.91,dc.date,/normal,charsize=charsize,color=foreground xyouts,0.06,0.87,strmid(dc.observer,0,20),/normal,charsize=charsize,color=foreground xyouts,0.25,0.95,string(dc.source_velocity/1.0e3,dc.velocity_definition,format='("V : ",F9.1," ",A8)'),$ /normal,charsize=charsize,color=foreground stint=strmid(adstring(dc.exposure/3600.0),1) xyouts,0.25,0.91,string(stint,format='("Int : ",x,A10)'),/normal,charsize=charsize,color=foreground xyouts,0.25,0.87,string(adstring(dc.lst/3600.0),format='("LST : ",A11)'),/normal,charsize=charsize,color=foreground scalevals,dc.observed_frequency,fsky,fskyprefix scalevals,dc.line_rest_frequency,frest,frestprefix scalevals,dc.bandwidth,bw,bwprefix xyouts,0.5,0.95,string(frest,frestprefix,format='("F0 : ",F9.5,x,a1,"Hz")'),/normal,charsize=charsize,color=foreground xyouts,0.5,0.91,string(fsky,fskyprefix, format='("Fsky : ",F9.5,x,a1,"Hz")'),/normal,charsize=charsize,color=foreground xyouts,0.5,0.87,string(bw,bwprefix, format='("BW : ",F8.4,x,a1,"Hz")'),/normal,charsize=charsize,color=foreground xyouts,0.7,0.95,string(dc.polarization,format='("Pol: ",A4)'),/normal,charsize=charsize,color=foreground xyouts,0.7,0.91,string(dc.if_number,format='("IF : ",I4)'),/normal,charsize=charsize,color=foreground xyouts,0.7,0.87,strmid(dc.projid,0,20),/normal,charsize=charsize,color=foreground xyouts,0.85,0.95,string(dc.tsys,format='("Tsys: ",F6.2)'),/normal,charsize=charsize,color=foreground xyouts,0.85,0.91,string(dc.mean_tcal,format='("Tcal: ",F6.2)'),/normal,charsize=charsize,color=foreground xyouts,0.85,0.87,dc.procedure,/normal,charsize=charsize,color=foreground ; this puts it off in space ... ; used to get the width so it can be centered sname = strtrim(dc.source) xyouts,0.45,-1.0,sname,width=width,/normal,charsize=charsize*1.5,charthick=1.5,color=greenHighlight startat=0.5-width/2.0 xyouts,startat,0.8,sname,/normal,charsize=charsize*1.5,charthick=1.5,color=greenHighlight xyouts,0.06,0.8,strtrim(adstring(dc.longitude_axis,dc.latitude_axis,1),2),/normal,charsize=charsize,color=foreground ha=getha(dc) xyouts,0.71,0.8,string(dc.azimuth,dc.elevation,ha,format='("Az: ",F5.1," El: ",F5.1," HA: ",F5.2)'),$ /normal,charsize=charsize,color=foreground xyouts,0.68,0.02,label_dc,/normal,charsize=charsize/1.4,color=redHighlight xyouts,0.8,0.02,systime(),/normal,charsize=charsize/1.4,color=foreground if ((mystate.bdrop gt 0) or (mystate.edrop gt 0)) then $ xyouts,0.02,0.02,string(mystate.bdrop,mystate.edrop,format='("bdrop : ",I4," edrop : ",I4)'), $ /normal,charsize=charsize/1.4,color=foreground end