; Routine to find slope of PR110L observation. ; ; list of PR110L observations with approximate centers ; first and last observation is F115LP ; list = 8800+[31,33,34,35,36,37,38,39,40,42,43,44,45,46] xc = [499,168,181,201,237,244,252,257,263,285,292,297,276,499] yc = [522,replicate(539,12),522] n = n_elements(list) ; ; determine y profiles ; yprofiles = fltarr(31,n) for i=0,n-1 do begin acs_read,list(i),h,d sub = d(xc(i)-6:xc(i)+6,yc(i)-15:yc(i)+15) tvscl,rebin(sub,130,310) yprofiles(*,i) = transpose(total(sub,1)) end ; ; determine y-centroid of first un-dispersed observation ; p = yprofiles(*,0) p = (p-max(p)*0.33)>0 ycentroid = total(p*findgen(31))/total(p) + yc(0)-15 ; ; compute cross correlation of spectra from first ; ycorr = fltarr(n) for i=0,n-1 do begin cross_correlate,yprofiles(*,0),yprofiles(*,i),off ycorr(i) = ycentroid + yc(i) - yc(0) - off end ; ; correct for image motion ; dbext,list,'expstart,exptime',start,integ time = start + integ/60.0d0/60.0d0/24.0d0/2.0 ycorr1 = ycorr - ((ycorr(n-1)-ycorr(0)) * $ (time-time(0))/(time(n-1)-time(0))) ; ; extract positions for the prism observations ; xx = xc(1:n-2) yy = ycorr1(1:n-2) ; ; fit line ; c = poly_fit(xx,yy,1,fit) slope = atan(c(1))*!radeg ; ; plot results ; set_plot,'ps' device,/land,file='PR110L_slope.ps' !p.thick=3 !x.thick=3 !y.thick=3 !p.title='PR110L Slope = '+strtrim(string(slope,'(F8.2)'))+' degrees' !x.title='X position (Pixels)' !y.title='Y position (Pixels)' !x.style=0 !y.style=1 plot,xx,yy,psym=4,symsize=2 oplot,xx,fit device,/close end