FUNCTION head_info,head

  ; check header for SUMROW and SUMCOL

  date_o = SXPAR(head,'DATE_OBS')  
  time_o = SXPAR(head,'TIME_OBS')
  IF DATATYPE(date_o) NE 'STR' THEN BEGIN
    date_o = SXPAR(head,'DATE-OBS')
    time_o = SXPAR(head,"TIME-OBS")
  ENDIF 
  date_o = STRING(date_o,format='(a14)')   ; date
  time_o = STRING(time_o,format='(2x,a8)')    ; time
    
  detect = STRCOMPRESS(SXPAR(head,"DETECTOR"),/REMOVE_ALL)  ; tel
  ins    = STRING(detect,format='(2x,a3)')
  exp_t  = STRING(STRCOMPRESS(SXPAR(head,"EXPTIME"),/REMOVE_ALL),format='(f8.1)') ;exptime

  naxis1 = STRING(STRCOMPRESS(chk_h4s(head,"NAXIS1"),/REMOVE_ALL),format='(a7)') ; naxis1
  naxis2 = STRING(STRCOMPRESS(chk_h4s(head,"NAXIS2"),/REMOVE_ALL),format='(a7)') ; naxis2
  p1col  = STRING(STRCOMPRESS(chk_h4s(head,"P1COL"),/REMOVE_ALL),format='(a7)')  ; p1col
  p1row  = STRING(STRCOMPRESS(chk_h4s(head,"P1ROW"),/REMOVE_ALL),format='(a7)')  ; p1row
  datazer= STRING(STRCOMPRESS(chk_h4s(head,"DATAZER"),/REMOVE_ALL),format='(a7)')  ; datazer 

  filter = STRING(SXPAR(head,"FILTER"),format='(2x,a6)')  ; filt

  IF DATATYPE(polar) EQ 'INT' THEN polar = ''
  if detect eq 'EIT' then polar = FXPAR(head,'SECTOR') $
                     else polar = FXPAR(head,'POLAR')
  polar  = STRING(STRCOMPRESS(polar,/REMOVE_ALL),format='(2x,a6)') ; pol

  lp_num = STRING(FXPAR(head,'LP_NUM'),format='(2x,a8)')


  wavel = SXPAR(head,"WAVELENG")
  IF DATATYPE(wavel) EQ 'INT' THEN wavel = '00000000'
  wavel = STRING(STRCOMPRESS(wavel,/REMOVE_ALL),format='(2x,a8)')

  img_info = date_o+time_o+ins+ $
                 exp_t+naxis1+naxis2+p1col+p1row + filter + polar + lp_num + wavel + datazer

RETURN,img_info
END
