function get_sfc_info, index, t2n, byfilter=byfilter, bypointing=bypointing, $
   head=head, nohead=nohead, notime=notime
;+
;   Name: get_sfc_info
;
;   Purpose: return summary info array for sft / sfc files (any sxt with .his)
;
;   Input Parameters:
;      index - sxt index (must have history record)
;-

nind=n_elements(index)

if not his_exist(index(0)) or nind eq 0 then begin
   tbeep
   message,/info,"Input must be sxt index including history record..."   
   return,''
endif 

t2n=fltarr(nind)
for i=0,nind-1 do begin				; loop incas d/dt is large
   tim2orbit,index(i),tim2night=tim2night	; (tim2orbit is slow then)
   t2n(i)=tim2night*60.				; seconds
endfor

tim=strjustify(fmt_tim(index))
filt=strjustify(strtrim(gt_filta(index,/string),2) + '/' +  $
   gt_filtb(index,/str))
dpe=strjustify(gt_dpe(index,/string)+ '  ')
suncen= strjustify(string(index.his.sun_center(0:1),format='(f9.2,"(X)",f9.2,"(Y)")'))
tim2night=strjustify(string(t2n,format='(f10.1)'))

b='  '

head= $
'FilA/FilB    DPE    ---- Sun Center ----     Tim2Nite(S)'
;Open/Al.1    23     531.51(X)   575.52(Y)          9.9
info=filt + b + dpe + suncen + tim2night
if not keyword_set(notime) then begin
   info= tim + b + info
   head='  Date       Time    ' + head
endif

case 1 of 
   keyword_set(byfilter):order=sort(gt_filtb(index,/string) + gt_filta(index,/string))
   else:
endcase

t2n=t2n(order)
info=info(order)
if not keyword_set(nohead) then info=[head,'',info]

if keyword_set(byfilter) then begin
   filt=filt(order)
   ufilt=uniq([filt])
endif
return,info

end
