;+ ; NAME: ; chief_log ; PURPOSE: ; Produce a label for the Chief Observer's Logbook ; CALLING SEQUENC: ; .run chief_log ; MODIFICATION HISTORY: ; 25-oct-93, JRL, Written ; 21-apr-95, JRL, ;- ; -------------------------------------------------------------------------- pro ps_center,y0,text,charsize=charsize,font=font ;+ ; NAME: ; ps_center ; PURPOSE: ; Write text to a Postscript file which is centered on the page. ; CALLING SEQUENCE: ; ps_center,y0,text,charsize=charsize,font=font ; y0 is in inches ; MODIFICATION HISTORY: ; 25-oct-93, JRL, Written ;- xpage = !d.x_size / !d.x_px_cm / 2.54 ; Page size in inches ypage = !d.y_size / !d.y_px_cm / 2.54 ; Page size in inches if n_elements(charsize) eq 0 then charsize = 1. if (n_elements(font) ne 0) and (!p.font eq 0) then i = execute('device,'+font) ; Setup the new font xyouts,.5,y0/ypage,/norm,text,size=charsize,align=.5 end ; -------------------------------------------------------------------------- ;;pro item,x0,y0,text,nobullet=nobullet,charsize=charsize ;; ;;xpage = !d.x_size / !d.x_px_cm / 2.54 ; Page size in inches ;;ypage = !d.y_size / !d.y_px_cm / 2.54 ; Page size in inches ;; ;;if n_elements(charsize) eq 0 then charsize = 1. ;;dy = 14./72.27 * charsize ; leading ;; ;;y1 = y0 ;;for i=0,n_elements(text)-1 do begin ;; y0 = y1 - dy*i ;; xyouts,x0/xpage,y0/ypage,/norm,text(i),charsize=charsize ;;endfor ;; ;;if not keyword_set(nobullet) then begin ;;; -------------------------------------------------------- ;;; Bullets ;; a = findgen(49)*(!pi*2/16.) ;; usersym,.75*cos(a),.75*sin(a),/fill ;; ;; x1 = (x0 - 8./72.) ; Back off 8 points ;; dy = 4. / 72.27 * charsize ; Approx Half a character ;; ;; plots,x1/xpage,([y1,y1] + dy )/ypage,psym=8,/norm ;;endif ;; ;;end ; -------------------------------------------------------------------------- ; Main routine starts here set_plot,'ps' xpage=192./25.4 & ypage=256./25.4 ; Max Kodak Printer size ; ------------ !p.font=0 ;!p.font=-1 ; Uncomment this for test mode ; ------------ if n_elements(end_date) eq 0 then end_date = '' if n_elements(start_date) eq 0 then start_date = gt_day(!stime,/str) input,'* Enter the start date: ', start_date, start_date input,'* Enter the end date: ', end_date, end_date device,/inches,xsize=xpage,ysize=ypage,xoffset=0.,yoffset=0. device,color=0,bits_per=4 plot,/norm,[0,0],[1,1],xstyle=4,ystyle=4 ; Suppress axis labels ps_center,9.8,'SXT',charsize=3.5,font='/times,/bold,/italic' ps_center,9.3,"Chief Observer's",charsize=2. ps_center,8.9,'Logbook',charsize=2. ; ,font='/schoolbook,/bold,/italic' ps_center,7.5,'Beginning: '+start_date,charsize=2.,font='/schoolbook,/italic' ; Page 2 plot,/norm,[0,0],[1,1],xstyle=4,ystyle=4 ; Suppress axis labels ps_center,9.8,"SXT Chief Observers's Logbook",charsiz=2.,font='/times,/bold,/italic' ps_center,9.3,'Beginning: '+start_date,charsize=2,font='/schoolbook,/italic' if strlen(strtrim(end_date,2)) gt 0 then ps_center,8.8,'Ending: '+end_date,charsize=2,font='/schoolbook,/italic' device,/close if !p.font eq 0 then begin input,'* Print the file? ',ans, 'Y' if strmid(strupcase(ans),0,1) ne 'N' then begin if n_elements(default_printer) eq 0 then default_printer = 'lp0' input,'* Enter printer: ', default_printer, default_printer pprint,dev=default_printer endif endif end