/* VnmrJ/VNMR macro to process 3D data for SAPPHIRE Developed By NMR Methodology Group School of Chemistry, University of Manchester United Kingdom This macro will use exp5 (or the one that was choosen by setting addsubexp) to add ni2 interferogram pure shift FIDs in a single FID $1 optional argument to choose the first FID of the array to be added; default value: 1 $2 optional argument to choose the last FID of the array to be added; default value: ni2 $3 step of addition; default value: 1 */ $addsubexp=5 exists('addsubexp','parameter'):$e if $e then $addsubexp=addsubexp endif $Curr_Exp_str='' jexp:$Curr_Exp,$Curr_Exp_str wft if ($#<>3) then write('error','Three arguments should be used..') abort endif if ($#=3) then $pm_sel_beg=$1 $pm_sel_end=$2 $pm_sel_step=$3 endif clradd //deletes the add/substract experiment $i=$pm_sel_beg ds($i) select($i) add('new') //creates a new FID element in the add/bustract experiment repeat $i=$i+$pm_sel_step select($i) // this loop repeats statements between repeat and until add until $i>=$pm_sel_end jexp(addsubexp) setvalue('nt',nt*($pm_sel_end/$pm_sel_step)) // sets the value of a parameter in a tree setvalue('ct',ct*($pm_sel_end/$pm_sel_step)) groupcopy('current','processed','acquisition') // copies a group of parameters from one tree to another (from_tree,to_tree,group) wft //exec('j'+$Curr_Exp_str) write('line3','%s FIDs were added and stored in exp%s',(($pm_sel_end-$pm_sel_beg+1)/$pm_sel_step),addsubexp) jexp5 wft aph0 vsadj