#!/usr/bin/perl #confirming cp bruker sequence # ae path H 0-> -1 # ae delP -1 # ae path C 0-> -1 # ae delP -1 #echo pathway delta Ps $dh= -1; $da= -1; $df= -1; use POSIX; $m=8; #total number of steps in phase cycle #put in phase cycle below explicitly # @hh=(1,3); #ph1 #@aa=(0,0,2,2,1,1,3,3); #ph2 cp pulse defined @aa=(3,3,1,1,0,0,2,2); #ph2 cp corrected due to spinlock not rotated! ; @ff=(0); #ph10 # # calculate path and phase of receiver now: for($i = 0; $i < $m; $i = $i+1){ $h = floor($i)%($#hh+1) ;# correct for partial phase def above $a = floor($i)%($#aa+1) ; $f = floor($i)%($#ff+1) ; $path = $hh[$h]*$dh + $aa[$a]*$da + $ff[$f]*$df ; $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"ph1 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%32 == 0){print "\n"}; $h = floor($i)%($#hh+1) ; printf"%1d", $hh[$h]; } printf"\n"; printf"ph2_CP "; 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"ph10 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%32 == 0){print "\n"}; $f = floor($i)%($#ff+1) ; printf"%1d", $ff[$f]; } 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";