; ; Find change in X and Y position of moon limb ; in SWRI calibrated eclipse images pixX = 256 pixY = 1024 img = fltarr(pixX,pixY) loadct,9 filenm=' ' listfile='./elist.cal close,13 & openr,13,listfile close,14 & openw,14,'moonlimbs' x = findgen(21) y = findgen(21) ; Initial coordinates of limb used for x and y changes respectively oldx0 = 425. oldy0 = 192. oldx1 = 828. oldy1 = 65. !y.range=[0,10000] ii=0 while ( not eof(13) ) do begin ;{ img=fltarr(pixX,pixY) readf,13,filenm print,filenm close,1 & openr,1,filenm readu,1,img ; Swap X and Y coordinates img=rotate(img,4) fimg = sobel(img) ; Use last position as a start and fit for gaussin +/- 10 pixels ; on either side oldx1=oldx0+403. avga=0. for jj=-2,2 do begin ylimb = fimg(oldx1+jj,oldy1-10:oldy1+10) ylimb=reform(ylimb,21) plot,ylimb yfit = gaussfit ( x,ylimb,a ) oplot,yfit avga=avga+a(1) end avga = avga/5. oldy1 = avga+oldy1-10 print,oldy1 ; stop oldy0=oldy1+127. avgb=0. for jj=-2,2 do begin xlimb=fimg(oldx0-10:oldx0+10,oldy0) xlimb=reform(xlimb,21) plot,xlimb yfit = gaussfit ( y,xlimb,b ) avgb=avgb+b(1) end avgb=avgb/5. oldx0=avgb+oldx0-10 print,oldx0 oplot,yfit ; stop printf,14,oldx0,oldy1 ii=ii+1 endwhile ;} close,14 close,13 stop end