#!/usr/bin/perl # #script to make EDROOPY decoupling sequence for bruker use Math::Trig ':pi'; use Math::Trig ; use Math::Complex; use POSIX "fmod"; ################################ DEFINE INPUT PARAMS BELOW # $start=0; $end=93; #NUMBER of stops $tf =0.001; #pulse length arbitrary $w1max=-36.7; #edroopy for vr=20khz, v1=100khz $lobes=1; $tot=$end+1; $pulse = $tot*0.1; # #MAKE pcpd2; nothing to edit below here ########################################### my @fdat=(); $sum=0; printf "\n"; printf "; steps $tot \n"; #use this for my sims here.. printf "; pcpd(ns) = 100\n"; #use this for my sims here.. print "0.3u fq=cnst21\n"; print "0.5u pl=pl12\n\n"; print "1 "; for($i = $start; $i <= $end; $i++){ $inc=$i/$end; $t= 0 + $tf*$inc; $u = $lobes*pi*((2*$t/$tf) - 1); $bf=$w1max*cos($u); $fl = fmod($pht,pi2); $fl=abs($fl); push @fdat, $bf; $sum=$sum +$bf; #printf "%4.0f\t%3.8f\t\n",$i, $bf; # use this to view shape if ($bf > 0){ printf "pcpd:%3.2f\t\n",$bf, $fl; #use this for my sims here.. } else{ $bf = $bf+360; printf "pcpd:%3.2f\t\n",$bf, $fl; #use this for my sims here.. } } print "jump to 1\n\n"; ########################################### exit;