pro rd_exec_synop_index, strarray, struct, mat=mat, infil=infil
;+
;NAME:
;	rd_exec_synop_index
;PURPOSE:
;	To read the executive synopsis index file into a structure
;HISTORY:
;	Written Aug-96 by M.Morrison
;	30-Oct-96 (MDM) - Added campaign number to the list
;	 6-Mar-97 (MDM) - Modified to put the index.tab file in $MDI_CAL_INFO
;-
;
;	setenv, 'MDI_EXEC_SYNOP=/data14/mdi_summary/exec_synop
;
;if (n_elements(infil) eq 0) then infil = '$MDI_EXEC_SYNOP/index.tab'
if (n_elements(infil) eq 0) then infil = '$MDI_CAL_INFO/cam_list_synop.tab'
;
strarray = rd_tfile(infil, nocomment='#')
remtab, strarray, strarray
temp = [strarray(1), strarray]
mat = str2cols(temp, ncol=7)   
mat = mat(*,1:*)
n = n_elements(mat(0,*))-2
mat = strcompress(strtrim(mat,2))
;
struct0 = {descr: '', sttim: '', entim: '', cam: '', jop: '', sun: '', cam_num: ''}
struct = replicate(struct0, n)
struct.descr 	= reform(mat(0,2:*))
struct.sttim	= reform(mat(1,2:*))
struct.entim	= reform(mat(2,2:*))
struct.cam	= reform(mat(3,2:*))
struct.jop	= reform(mat(4,2:*))
struct.sun	= reform(mat(5,2:*))
struct.cam_num	= reform(mat(6,2:*))
;
ss = where(strpos(struct.sttim, ':') eq -1, nss)   & if (nss ne 0) then struct(ss).sttim = struct(ss).sttim + ' 0:00'
ss = where(strpos(struct.entim, ':') eq -1, nss)   & if (nss ne 0) then struct(ss).entim = struct(ss).entim + ' 0:00'
;
end