pro spshft,ds,spi,a=a ; Shift an image so that the wavelength solution is ; the same for all columns if n_params() lt 1 then begin print,'pro spshft,ds,spi,a' return endif if (keyword_set(a) eq 0) then a=[116.456,-8.52431e-05] ;row shift sz=size(ds) nrow=sz(2) ncol=sz(1) if (sz(0) eq 2 ) then begin spi = fltarr(ncol,nrow) p = findgen(ncol) for i=0,nrow-1 do begin spi(*,i) = interpolate(ds(*,i),p+a(1)*(i-a(0))^2.0,/cubic) endfor endif else begin nim = sz(3) spi = fltarr(ncol,nrow,nim) p = findgen(ncol) for j=0,nim-1 do begin for i=0,nrow-1 do begin spi(*,i,j) = interpolate(ds(*,i,j),p+a(1)*(i-a(0))^2.0,/cubic) endfor endfor endelse return end