// Set FSLG

aHfslg = aH90
$pwHfslg = sqrt(2.0/3.0)*4.0*pwH90
pwHfslg = 0.1*trunc($pwHfslg/0.1 + 0.5)
ofdHfslg = -1.0/(sqrt(3)*pwHfslg*1e-6)
if (nHfslg < 1.0) then nHfslg = 1 endif

// Synchronize the dwell with the FSLG Cycle

if (pwHfslg > 0.0) then 
   sw1 = 1.0/(8.0*pwHfslg*1e-6)
endif   

// Synchronize the Rotor Cycle with FSLG and Tau with
// the Rotor Cycle. 

if (srate > 500) then 
   $taur = 2.0*pwHfslg*1e-6*trunc(1.0/(srate*2.0*pwHfslg*1e-6) + 0.5)
   srate = trunc(1.0/$taur + 0.5)
   $tHXhsqc = $taur*1e6*trunc(tHXhsqc/($taur*1e6) + 0.5)
   tHXhsqc = $tHXhsqc
endif   

// Set the HSQC Pulses from Calibrations

aHhxhsqc = aH90
aXhxhsqc = aX90
pmHhxhsqc = pwH90*54.7/90.0
pw1Hhxhsqc = pwH90
pw2Hhxhsqc = 2.0*pwH90
pw1Xhxhsqc = pwX90
pw2Xhxhsqc = 2.0*pwX90













