pro timeq,inp,tim,out ; Procedure to make the frames in the movie equidistant in time. ; Based on linear interpolation of time-vector for each pixel. ; INPUTS: inp = input movie (3-D array) ; tim = 1-D array with original non-eqiudistant time data ; in hours (e.g. tim=reform(sel(1,*)). ; OUTPUTS: out = interpolated output movie, equidistant in time, ; with time_step = step. ; Calling: INTERPOL,NINT ; Example: TIMEQ,gms,tim,gmsi ; 19.9.95, Michal sim=size(inp) sit=size(tim) if (sim(0) ne 3) or (sit(0) ne 1) then goto,wrong if sim(3) ne sit(1) then goto,wrong n=sim(3) print,'time beginning at',tim(0),' hours' ti=tim-tim(0) step=ti(n-1)/(n-1) print,'constant time step in seconds:',step*3600. ti=ti/step ; non-equidistant time-abscissa tie=findgen(n) ; equidistant time-abscissa out=inp ; output array for y=0,sim(2)-1 do begin for x=0,sim(1)-1 do begin if sim(4) eq 2 then $ out(x,y,*)=nint(interpol(inp(x,y,*),ti,tie)) $ else out(x,y,*)=interpol(inp(x,y,*),ti,tie) endfor print,y endfor goto,fin wrong: print,'WRONG INPUT ARRAYS: bad dimensions or incompatible sizes' out=0 fin: end