jexp1 "use exp1 to get data " input('filename? '):$filename "prompt for filename" rt($filename) "assumes you are in the correct directory" lb=2 wft aph0 f full "process arrayed data" $spectdc=1 repeat select($spectdc) dc "baseline correct data" $spectdc=$spectdc+1 until $spectdc > celem select(1) ds peak:$ht,cr $first=cr "select 1st spectrum, get ACN peak position" select(celem) ds peak:$ht,cr $last=cr "select last spectrum, get ACN peak position" $drift=($first - $last)/celem "calcualte drift rate" write('line3',$drift) clradd "clear buffer exp5" $spect=1 repeat select($spect) lsfrq=$drift * ($spect - 1) "load each fid and shift frequency" add "add to exp5" $spect=$spect+1 until $spect > celem jexp5 "go to exp5" wft dc vsadj "take a look " $filename = $filename+'_'+'sum' "save summed data" svf($filename)