PRO project_subtitle, a, title, SSCWEB=SSCWEB, IMAGE=IMAGE, TIMETAG=TIMETAG,$
TCOLOR=TCOLOR,ps=ps
if (n_elements(TCOLOR) gt 0) then TCOLOR=TCOLOR else TCOLOR=247
if keyword_set(SSCWEB) then web_code='SSCWEB' else web_code='CDAWeb'
if (title ne '') then begin
if keyword_set(ps) then begin
xyouts,!d.x_size/2,!d.y_size-4*!d.y_ch_size,title,/DEVICE,ALIGNMENT=0.5,$
COLOR=TCOLOR
endif else begin
xyouts,!d.x_size/2,!d.y_size-!d.y_ch_size,title,/DEVICE,ALIGNMENT=0.5,$
COLOR=TCOLOR
endelse
endif
pi = ' ' & s='' & b = tagindex('PROJECT',tag_names(a))
move_up = 0L
if (b[0] ne -1) then begin
if(n_elements(a.PROJECT) eq 1) then begin
pr = break_mystring(a.PROJECT,delimiter='>')
endif else begin
pr = break_mystring(a.PROJECT[0],delimiter='>')
endelse
if (pr[0] eq 'ISTP') then begin
s = 'Key Parameter and Survey data (labels K0,K1,K2)'
s = s + ' are preliminary browse data.' + '!C'
endif
b = tagindex('PI_NAME',tag_names(a))
if (b[0] ne -1) then begin
if(n_elements(a.PI_NAME) eq 1) then pi = a.PI_NAME
endif
b = tagindex('PI_AFFILIATION',tag_names(a))
if (b[0] ne -1) then begin
if((n_elements(a.PI_AFFILIATION) eq 1) and (a.PI_AFFILIATION[0] ne "")) then begin
if keyword_set(ps) then lenlimit=35 else lenlimit=40
if (strlen(pi)+strlen(a.pi_affiliation) gt lenlimit) then begin
pi = pi + '!C at '+ a.PI_AFFILIATION
move_up = 1L
endif else pi = pi + ' at '+ a.PI_AFFILIATION
endif
endif
pi = 'Please acknowledge data provider, ' + pi + ' and '+ web_code +' when using these data.'
s = s + ' Generated by '+ web_code + ' on ' + systime()
endif
if (s ne '') then begin
c = 1.0
if ((!d.x_ch_size * strlen(s)) gt !d.x_size) then begin
b = float(!d.x_ch_size * strlen(s)) / float(!d.x_size)
c = 1.0 - (b/7.0)
endif
if (c ge 0.75) then begin
if keyword_set(IMAGE) then begin
if keyword_set(TIMETAG) then begin
d = size(TIMETAG)
if d[0] eq 0 then begin
ts = 'Frame time: ' + decode_cdfepoch(TIMETAG)
if (move_up) then xyouts,!d.x_size/2,!d.y_ch_size*4.,ts,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c+.5,COLOR=TCOLOR else $
xyouts,!d.x_size/2,!d.y_ch_size*2.,ts,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c+.5,COLOR=TCOLOR
endif else begin
ts = 'Time Range: ' + decode_cdfepoch(TIMETAG[0]) + ' to ' + $
decode_cdfepoch(TIMETAG[1])
if (move_up) then xyouts,!d.x_size/2,!d.y_ch_size*4.,ts,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,COLOR=TCOLOR else $
xyouts,!d.x_size/2,!d.y_ch_size*2.,ts,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,COLOR=TCOLOR
endelse
if (not keyword_set(ps) and not move_up) then xyouts,!d.x_size/2,!d.y_ch_size,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,COLOR=TCOLOR else xyouts,!d.x_size/2,34L,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endif
if (not keyword_set(ps) and not move_up) then xyouts,!d.x_size/2,!d.y_ch_size/10,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,COLOR=TCOLOR else xyouts,!d.x_size/2,!d.y_ch_size,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endif else begin
if keyword_set(ps) then begin
endif else begin
if move_up then begin
xyouts,!d.x_size/2,34L,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
xyouts,!d.x_size/2,!d.y_ch_size,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endif else begin
xyouts,!d.x_size/2,!d.y_ch_size*2.,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
xyouts,!d.x_size/2,!d.y_ch_size,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endelse
endelse
endelse
endif
if (c lt 0.75) then begin
s = ''
if (pr[0] eq 'ISTP') then begin
s = 'Key Parameter and Survey data (labels K0,K1,K2) are '
s = s + 'preliminary browse data.' + '!C'
endif
gen_date = ' Generated by '+ web_code + ' on ' + systime()
if keyword_set(IMAGE) then begin
if keyword_set(TIMETAG) then begin
d = size(TIMETAG)
if d[0] eq 0 then ts = 'Frame time: ' + decode_cdfepoch(TIMETAG) $
else ts = 'Time Range: ' + decode_cdfepoch(TIMETAG[0]) + ' to ' + $
decode_cdfepoch(TIMETAG[1])
ts = ts + '; ' + gen_date
xyouts,!d.x_size/2,!d.y_ch_size*2.,ts,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,COLOR=TCOLOR
xyouts,!d.x_size/2,!d.y_ch_size,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,COLOR=TCOLOR
endif
xyouts,!d.x_size/2,!d.y_ch_size/10,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,COLOR=TCOLOR
endif else begin
if keyword_set(ps) then begin
if move_up then begin
xyouts,!d.x_size/2,!d.y_ch_size*2.75,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
xyouts,!d.x_size/2,!d.y_ch_size,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endif else begin
xyouts,!d.x_size/2,!d.y_ch_size*2.,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
xyouts,!d.x_size/2,!d.y_ch_size,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endelse
endif else begin
if move_up then begin
xyouts,!d.x_size/2,34L,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
xyouts,!d.x_size/2,!d.y_ch_size,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endif else begin
xyouts,!d.x_size/2,!d.y_ch_size*2.,pi,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
xyouts,!d.x_size/2,!d.y_ch_size,s,/DEVICE,ALIGNMENT=0.5,CHARSIZE=c,color=tcolor
endelse
endelse
endelse
endif
endif
end