PRO framesel,log,first,tint,newlog ; ; Makes frame selection from a series of SAVE_ALL images, ; using log array. Creates a new log array with selected frames. ; INPUTS: ; LOG - original log array made by READSSTLOG_S with ; time (UT) in seconds ; FIRST - file number of the frame where you want to start ; TINT - selection interval (seconds) ; OUTPUT: ; NEWLOG - new log array containing selected frames ; (seq.no., time UT (s), quality, exp.time (ms)) ; on_error,1 newlog=log*0. w1=where(log(0,*) eq first, c1) if c1 ne 1 then MESSAGE,'Wrong first frame number' t0=log(1,w1(0)) ; time of start nn=3 i=0 ; in the tint interval, there must be more than 2 frames - ; - otherwise the series was already created by frame selection while (nn gt 2) do begin w=where((log(1,*)-t0 lt tint) and (log(1,*)-t0 ge 0), nn) if nn le 2 then goto,out qmax=max(log(2,w), mpos) newlog(*,i)=log(*,mpos+w(0)) i=i+1 nxt=w(nn-1)+1 t0=log(1,nxt) out: endwhile w1=where(newlog(0,*),c1) if c1 le 0 then message,'No frames to select' newlog=newlog(*,w1) END