#!/usr/bin/perl # # building from seq cpRFDR and modified vs from YI used # seems cpRFDR might have phase cycling issue # ae path H 0-> -1 # ae path C 0-> -1 -> 0 -> -1 # ae delP -1 1 -1 #ae pathway delta Ps #H below $dh= -1; $df= -1; #C below $da= -1; $db= 1; $dc= -1; use POSIX; $m=16; #total number of steps in phase cycle #put in phase cycle below explicitly # @hh=(3,1); #these multipliers work #@aa=(3); #ph2 cp defined @aa=(2); #ph2 cp corrected for spinlock not rotated @bb=(0,0,0,0,2,2,2,2); #ph3 @cc=((0)x8, (2)x8 ); #ph5 # @ff=(0,0,2,2); #ph10 cp defined @ff=(3,3,1,1); #ph10 cp corrected for spinlock not rotated # # 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) ; $b = floor($i)%($#bb+1) ; $c = floor($i)%($#cc+1) ; $f = floor($i)%($#ff+1) ; $path = $hh[$h]*$dh + $aa[$a]*$da + $bb[$b]*$db + $cc[$c]*$dc + $dd[$d]*$dd + $ff[$f]*$df + $ee[$e]*$de + $gg[$g]*$dg ; $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)%16 == 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)%16 == 0){print "\n"}; $a = floor($i)%($#aa+1) ; printf"%1d", $aa[$a]; } printf"\n"; printf"ph3 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%16 == 0){print "\n"}; $b = floor($i)%($#bb+1) ; printf"%1d", $bb[$b]; } printf"\n"; printf"ph5 "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%16 == 0){print "\n"}; $c = floor($i)%($#cc+1) ; printf"%1d", $cc[$c]; } printf"\n"; printf"ph10_cp "; for($i = 0; $i < $m; $i = $i+1){ if(floor($i)%4 == 0){print " "}; if(floor($i)%16 == 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)%16 == 0){print "\n"}; printf"%1d", $rx[$i]; } printf"\n";