function shiftcube,incube,q,vpeakpt,vdisppt,offsetpt,res,v0,dv0 ;------------------------------------ ; Trims a datacube to contain the appropriate sections of the ; spectrum for analysis, thereby communicating the lag effects. ;------------------------------------ ;used by the more advanced SCF routines to analyze the lag parameter dimen=size(incube) output=fltarr(dimen(1),dimen(2),2*q*vdisppt+1) for a=0,dimen(1)-1 do begin for b=0,dimen(2)-1 do begin inspec=incube(a,b,*) ;vpeakpt=round((inparams(a,b)-v0)/dv0) output(a,b,*)=(inspec(vpeakpt-q*vdisppt+offsetpt:vpeakpt $ +q*vdisppt+offsetpt));,q*vdisppt,/edge_truncate) endfor endfor return,output end