PRO registeri,date ; ;REGISTRATION of IR images to match the WL ones, one by one. ;This version is intended for the processing of the IR observations ;of 23, 25 June 1997 (SVST). ;It is expected to be run from the 'irdata' directory, although ;it reads also data from the 'wldata' directory. ; ;Both IR and WL movies are supposed to be correlated, destretched, ;sonic filtered, and having the same size and FOV ; - i.e. they were processed before ;by CORRELI, DESTRE_F*, and SONIC3D. ;DEFORMO is used here to match IR to WL one by one. ; ;NOTE: only the frames 7:si(3)-8 (unaffected by apodization) ;are registered!! Frames at the beginning and the end are left ;without any change. Apodized edges of frames are preserved. ; ;INPUTS: date = 23 or 25 ; files 'ifiXX[a,b].bin' (IR movie) ; 'wsiXX[a,b].bin' (WL movie) ;OUTPUTS: files 'isiXX[a,b].bin' (registered IR) ;28 September 1999 ; on_error,1 ; ------------------ PARAMETERS for DEFORMO ------------------------- smo = 20 ; U.M. SMOOTHING PARAMETER (3.32") umq =0.5 ; U.M. COEFFICIENT (0: no masking, 1: total difference) wid = 36 ; FWHM of Gaussian window (6") reb = 2 ; rebin down to 1/2 ; ------------------------------------------------------------------- ; 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) if date eq 23 then si=[3,408,320,118] else si=[3,388,300,150] ;size of movies imov=intarr(si(1),si(2),si(3)) ; IR read-in array wmov=intarr(si(1),si(2),si(3)) ; WL read-in array ; ----------------------------------------------------------------- ;First part ; READING (path specifications) openr,1,'ifi'+dat+'a.bin' readu,1,imov close,1 openr,1,'../wldata/wsi'+dat+'a.bin' readu,1,wmov close,1 ; WARPING (destretching) for i=7,si(3)-8 do begin ;LOOP OVER FRAMES iim=reform(imov(*,*,i)) wim=reform(wmov(*,*,i)) DEFORMO,iim,wim,RI,smo,umq,wid,reb,interp=(-0.5) imov(0,0,i)=RI endfor ; WRITING openw,1,'isi'+dat+'a.bin' print,'Saving ','isi'+dat+'a.bin' writeu,1,imov close,1 ;Second part ; READING (path specifications) openr,1,'ifi'+dat+'b.bin' readu,1,imov close,1 openr,1,'../wldata/wsi'+dat+'b.bin' readu,1,wmov close,1 ; WARPING (destretching) for i=7,si(3)-8 do begin ;LOOP OVER FRAMES iim=reform(imov(*,*,i)) wim=reform(wmov(*,*,i)) DEFORMO,iim,wim,RI,smo,umq,wid,reb,interp=(-0.5) imov(0,0,i)=RI endfor ; WRITING openw,1,'isi'+dat+'b.bin' print,'Saving ','isi'+dat+'b.bin' writeu,1,imov close,1 END