#!/usr/bin/perl # confirming phase cycling in bruker standard dq/sq expt; seems ok # ;wpmlgdqsqspc5 (topspin 3.0); watch internal phase shift on last pulse # ae path C 0-> 2 -> 0 -> -1 # ae delP 2 -2 -1 #echo pathway delta Ps $da= 2; $db= -2; $dc= -1; use POSIX; $m=16; #total number of steps in phase cycle #put in phase cycle below explicitly # @aa=(0); #ph11 @bb=(0,1,2,3); #ph13 @cc=(1,1,1,1, 2,2,2,2, 3,3,3,3, 0,0,0,0); #ph1 # # calculate path and phase of receiver now: for($i = 0; $i < $m; $i = $i+1){ $a = floor($i)%($#aa+1) ; $b = floor($i)%($#bb+1) ; $c = floor($i)%($#cc+1) ; # #NOTE INTERNAL PHASES TOO, like Y-pulse on last block ##ph_dig and pha,phb.. phd all stay the same in calc above. just shift accordingly see levitt $c_internal= 1; #y shift on last pulse # $path = $aa[$a]*$da + $bb[$b]*$db + ($cc[$c]*$dc+$c_internal) ; $ph_dig= -1*$path%4; $rx[$i]=$ph_dig; #printf"%3d\t %3d\t %3d\t %3d\t %3d\t %3d\t %3d\n",$i, $a, $b, $c, $d, $rx, $ph_dig; } # ##PRINT OUT phase cycles printf"ph11 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%32 == 0){print "\n"}; $a = floor($i)%($#aa+1) ; printf"%1d", $aa[$a]; } printf"\n"; printf"ph13 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%32 == 0){print "\n"}; $b = floor($i)%($#bb+1) ; printf"%1d", $bb[$b]; } printf"\n"; printf"ph1 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%32 == 0){print "\n"}; $c = floor($i)%($#cc+1) ; printf"%1d", $cc[$c]; } printf"\n"; printf"ph31 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%32 == 0){print "\n"}; printf"%1d", $rx[$i]; } printf"\n";