PRO wbigshift,date,from,to,shfts ; ;Manual corrections of big jumps of FOV in the WL 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/wd'+dat+'.' im=intarr(1528,1024) if date eq 23 then nima=321 else nima=324 ; -------------------------------------------------------------------- shfts=intarr(2,nima) window,0,xsiz=764,ysiz=512 ;main window window,2,xsiz=382,ysiz=256 ;auxiliary window to show shifted frames wset,0 openr,1,nami+strtrim(from,2) ;1st frame readu,1,im close,1 tvscl,rebin(im,764,512) xyouts,700,480,strtrim(from,2),/device,col=0,charsiz=2,charthick=2 cursor,x0,y0,/device,/down plots,[x0,x0],[0,512],col=255,/device ;plot a cross plots,[0,764],[y0,y0],col=255,/device wset,2 x00=nint(x0/2.) y00=nint(y0/2.) tvscl,rebin(im,382,256) plots,[x00,x00],[0,256],col=255,/device ;plot a cross plots,[0,382],[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,rebin(im,764,512) xyouts,700,480,strtrim(i,2),/device,col=0,charsiz=2,charthick=2 plots,[x0,x0],[0,512],col=0,/device ;plot a cross at previous position plots,[0,764],[y0,y0],col=0,/device cursor,x,y,/device,/down plots,[x,x],[0,512],col=255,/device ;plot a cross at current position plots,[0,764],[y,y],col=255,/device shfts(0,i)=2*(x0-x) ;multiply by 2 to compensate the shfts(1,i)=2*(y0-y) ; rebin to 1/2 wset,2 tvscl,rebin(shift(im,total(shfts(0,*)),total(shfts(1,*))),382,256) ; frames shifted for cumulative shift x0=x plots,[x00,x00],[0,256],col=255,/device ;plot a cross plots,[0,382],[y00,y00],col=255,/device y0=y endfor wset,0 END