// Set SAM and Tilt Pulse

aHsam = aH90
pwHtilt = 0.0125*trunc(pwH90*35.3/(90.0*0.0125) + 0.5)

if (nHsam < 1) then nHsam = 1 endif // rotor periods per waveform
if (qHsam < 3) then qHsam = 3 endif // amplitude cycles per period

// Set a 2D Experiment

exists('ni','parameter'):$ni
if ($ni<0.5) then 
   par2d
   ni = 64
   phase=1,2
   refsource1 = 'dfrq'
   axis = 'pd'
   scalesw1 = sqrt(3) 
endif

// Synchronize the F1 Dwell amd pwHsam with the Rotor Cycle

$tauR = 0.1*2.0*qHsam*trunc(1.0e6/(srate*2.0*qHsam*0.1) + 0.5)
pwHsam = $tauR
srate = 1.0e6/$tauR
sw1 = 1.0e6/$tauR

// Set the 2D Processing Parameters

setprotect('refsource1 axis scalesw1','off',16384)
refsource1 = 'dfrq'
axis = 'pd'
scalesw1 = 1.0
 

