; ; list of PR200L observations with approximate centers ; using F250W ; list = [8708,8709,8712,8716,8718,8720,8722, $ 8724,8727,8729,8731,8733,8737,8742,8744] nobs = [ 1, 2, 3, 2, 2, 2, 2, $ 3, 2, 2, 2, 2, 2, 2, 2] xc = [ 487, 959, 952, 941, 938, 932, 929, $ 925, 923, 918, 916, 911, 906, 962, 490]-19 wave = [0, 2144.922, $ 2246.215, 2440.797, 2487.919, 2628.815, 2734.770, $ 2930.652, 2998.845, 3219.139, 3379.250, 3521.476, $ 3909.867, 2144.922, 0] yc = ((wave eq 0)*521 + (wave ne 0)*518)-20 n = n_elements(list) ; ; determine y profiles ; yprofiles = fltarr(31,n) for i=0,n-1 do begin acs_cr,indgen(nobs(i))+list(i),h,d,/disp 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',start1 dbext,list+nobs-1,'expstart,exptime',start2,integ stop2 = start2 + integ/60.0d0/60.0d0/24.0d0 time = (start1+stop2)/2.0 ;midpoint time = time-time(0) ; ; extract F250W data ; good = where(wave eq 0) wf250w = wave(good) offset = ycorr(good)-ycorr(good(0)) tf250w = time(good) ; ; correct for motion ; linterp,tf250w,offset,time,off ycorr1 = ycorr - off ; ; extract prism data ; good = where(wave gt 0) xx = xc(good) yy = ycorr1(good) ; ; fit line ; c = poly_fit(xx,yy,1,fit) slope = atan(c(1))*!radeg ; ; plot results ; set_plot,'ps' device,/land,file='PR200L_slope.ps' !p.thick=3 !x.thick=3 !y.thick=3 !p.title='PR200L 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