// Set wsamX

aXwsam = aX90
if (qXwsam < 3) then qXwsam = 3 endif 

// Set pwXwsam to 1 rotor cycle.

$tauR = 0.30*qXwsam*trunc(1.0e6/(srate*qXwsam*0.30) + 0.5)
pwXwsam = $tauR
srate = 1.0e6/$tauR

// Set tau to add a 4.0 us window

tauXwsam = pwXwsam + 4.0
sw = 1/(tauXwsam*1e-6)
if (npaXwsam < 10) then npaXwsam = 10 endif

// Reset the prep pulses

aXprep = aX90
pwXprep = pwX90
phXprep = 0.0 




