pro goes13_time2composite,time0,time1,index,data, $
   short_only=short_only, long_only=long_only


parent='/sxi02/sxifm1a/fits_sec'
long=sxi_high_cadence(time0,time1,/l1q,goesn=13,parent=parent, $
   wavelnth='PTHNa_1',img_code='CS')

short=sxi_high_cadence(time0,time1,/l1q,goesn=13,parent=parent)


case 1 of 
   keyword_set(short_only): begin 
     if short(0) ne '' then begin 
        mreadfits,short,index,data
     endif else box_message,'No short exposure images...
   endcase
   keyword_set(long_only): begin 
      if long(0) ne '' then begin 
         mreadfits,long,index,data
      endif else message,'No Long exposure images...
   endcase
   else: begin
      if long(0) ne '' and short(0) ne '' then begin 
         mreadfits,long,index,data
         mreadfits,short,sii,sdd
         times=lii
         ssl=tim2dset(lii,sii,delta=dts)
         for i=0,n_elements(times)-1 do begin 
            sssat=where(data(*,*,i) eq max(data(*,*,i)))
            data(sssat)=sdd(sssat)
         endfor
         
      endif else box_message,"Cannot find matches for any pairs..."
   endcase
endcase


return
end
