//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 Decoupling during C7

aHmix = aH90













