PRO ibigshift,date,from,to,shfts ; ;Manual corrections of big jumps of FOV in the IR time series ;of 23,25 June 1997. ;METHOD: marking a feature by a cursor. ;INPUTS: date = 23 or 25 ; from = seq. of the first image in the subseries ; to = seq. of the last image in the subseries ; derotated files XXjun/wdXX.seq, where XX is the date ;OUTPUT: shfts = 2-column (dx,dy) array of relative shifts (A-B) ; between consecutive frames A,B of the subseries. ; The shift has to be applied to B to move it to ; the position of A. ; This array, however, has the full length of ; the time series, where the unprocessed parts ; are filled by zeros. In case of multiple use ; of WBIGSHIFT on the same series (but different ; subseries), individual SHFTS have to be summed. ; on_error,1 ; IMAGE PARAMETERS ---------------------------------------------------- if (date ne 23) and (date ne 25) then $ message,'Sorry, I do not know how to handle this dataset' dat=strtrim(date,2) nami=dat+'jun/id'+dat+'.' im=intarr(224,224) if date eq 23 then nima=321 else nima=324 ; -------------------------------------------------------------------- shfts=intarr(2,nima) window,0,xsiz=224,ysiz=224 ;main window window,2,xsiz=224,ysiz=224 ;auxiliary window to show shifted frames wset,0 openr,1,nami+strtrim(from,2) ;1st frame readu,1,im close,1 tvscl,im xyouts,165,195,strtrim(from,2),/device,col=0,charsiz=2,charthick=2 cursor,x0,y0,/device,/down plots,[x0,x0],[0,224],col=255,/device ;plot a cross plots,[0,224],[y0,y0],col=255,/device wset,2 x00=x0 y00=y0 tvscl,im plots,[x00,x00],[0,224],col=255,/device plots,[0,224],[y00,y00],col=255,/device for i=from+1,to do begin openr,1,nami+strtrim(i,2) readu,1,im close,1 wset,0 tvscl,im xyouts,165,195,strtrim(i,2),/device,col=0,charsiz=2,charthick=2 plots,[x0,x0],[0,224],col=0,/device ;plot a cross at previous position plots,[0,224],[y0,y0],col=0,/device cursor,x,y,/device,/down plots,[x,x],[0,224],col=255,/device ;plot a cross at current position plots,[0,224],[y,y],col=255,/device shfts(0,i)=x0-x shfts(1,i)=y0-y wset,2 tvscl,shift(im,total(shfts(0,*)),total(shfts(1,*))) ; frames shifted for cumulative shift x0=x y0=y plots,[x00,x00],[0,224],col=255,/device plots,[0,224],[y00,y00],col=255,/device endfor wset,0 END