//Set the C7 pulses from the Spin Rate

if (srate>500) then 
   $pwXc7 = 1.0e6/(7.0*srate)
   pwXc7 = 0.4*trunc($pwXc7/0.4 + 0.5)
   srate = 1.0e6/(7.0*pwXc7)
   aXc7 = aX90*(4.0*pwX90)/pwXc7
   if (aXc7 >= 4095) then 
      write('error','reset_c7 Error: aXc7 is >= to 4095')
   endif
endif

if (qXc7 < 1) then qXc7 = 1.0 endif

// Set a 2D Experiment

exists('ni','parameter'):$ni
if ($ni<0.5) then 
   par2d
   ni = 64
   phase=1,2
   refsource1 = 'sfrq'
   axis = 'pp'
endif

// Set Decoupling during C7

aHmix = aH90

setprotect('refsource1 axis','off',16384)













