; ccctocsy_nnh_pfg_lek_600_cp
; Avance version - 26 November 2013
/* This version is based on ccctocsy_nnh_3c_pfg_sel_600_v4_cryo.c, lek, Dec 17, 2010 */
/* pulse scheme for assignment of sidechain chemical shifts (13C,15N,1HN)

  1H  > 13C(t1) (43 ppm) > flopsy > 13Ca to 13CO (58 ppm) > 13CO to 15N (176 ppm)
     > 15N (t2) to HN (t3)

  The major difference with this sequence and others on the Varian is that the carrier
    is jumped to CO (176) during the 13CO to 15N step and remains at 13CO till the end

  To calibrate:

   a: 13C carrier at 43 ppm
    13C high power pulse, pwc = p2 at pl2
        CO decoupling, pl23, using onepulse.sp23
   b: 13C carrier at 58 ppm
       pwca90b D/sq(15) where D = 118 ppm (on res), p24, pl24
       pwca180b D/sq(3) where D = 118 ppm (on res), p25, pl25
       pwco180b D/sq(3) where D = 118 ppm (off res, using pwco180b:sp25, + shift)
                   p25, sp25

       using 13C decoupling with pl27 and onepulse.sp27

   c: 13C carrier at 176 ppm
       pwco90c D/sq(15) where D = 118 ppm (on res), p24, pl24
       pwco180c D/sq(3) where D = 118 ppm (on res), p25, pl25
       pwca180c D/sq(3) where D=118 ppm (off res, using :pwca180c:sp30 , - shift)
                      p25,sp30

       off resonance decoupling  of 13Ca using pl26 and onepulse.sp26

      flopsy transfer uses pl22 and p22

  Note: Make sure that when using Bax/Logan trick the d0 is large enough to accomodate
   what you subtract.

  Written by LEK on October 28, 2014
  Modified by LEK on Oct 29, 2014 to include ph26,...,ph29

  Modified by LEK on July 17, 2017 to ensure that the flopsy period is
   exactly a multiple of the flopsy scheme

  Modified by LEK on August 9, 2019 to allow shared CT in 15N t2
  Modified by LEK on Aug 9, 2019 to make just 1 coherence transfer gradient on 1H at the end
 */

#include <Avance.incl>
#include <Grad.incl>
#include <Delay.incl>

;Define phases
#define zero ph=0.0
#define one ph=90.0
#define two ph=180.0
#define three ph=270.0

;Define Pulses
define pulse pwh
       "pwh=p1"
define pulse pwmlev
       "pwmlev=p12"
define pulse pwn
       "pwn=p3"
;Carbon pulses when 13C carrier is at 43ppm:
define pulse pwc
       "pwc=p2"
define pulse pwcdip
       "pwcdip=p22"
define pulse pwcodec
       "pwcodec=p23"
;Carbon pulses when 13C carrier is at 58ppm/176ppm:
define pulse pwca90b
       "pwca90b=p24"
define pulse pwco180b
       "pwco180b=p25"
define pulse pwca180b
       "pwca180b=p25"
define pulse pwco90c
       "pwco90c=p24"
define pulse pwco180c
       "pwco180c=p25"
define pulse pwca180c
       "pwca180c=p25"
define pulse pwcadec  ; seduce90 for Ca dec
       "pwcadec=p26"
define pulse pwcbdec  ; wurst for selective Cb dec
       "pwcbdec=p27"
define pulse pwd
       "pwd=p4"
define pulse pwddec
       "pwddec=p41"

;Define delays
"d11=30m"
"in0=inf1/2"
"in10=inf2/2"

define delay taua
       "taua = d20"      ; < 1/4JCH ~ 1.8 ms

define delay taub
       "taub = d21"     ; ~ 0.3/JCH * 0.5,  1.05 ms

define delay tauc
       "tauc = d22"       ; < 1/4JCaCO ~ 3.6 ms ARRAY with Cb dec

define delay taud
       "taud = d23"       ; 1/4JCaCO, 4.9 ms

define delay taue
       "taue = d24"      ; < 1/4JNCO , ~ 12.4 ms

define delay bigTN
       "bigTN = d25"     ; < 1/4JNCO delay, N constant time period

define delay tauf
       "tauf = d26"       ; < 1/4JNH, ~ 2.2 ms

define delay zeta
define delay zeta1
       "zeta1=0.1u"
 
define delay bigT1
     "bigT1 = d14"  ; 650 us

define delay hscuba
      "hscuba = 30m"

;Define flags
;define f1180  ; set zgoptns -Df1180
#ifdef f1180
 "d0= (in0/2)"    
#else
 "d0=0.2u"
#endif

;define f2180  ; set zgoptns -Df2180
#ifdef f2180
 "d10=(in10/2)"
#else
 "d10=0.2u"
#endif

;"acqt0=0"
;aqseq 321     ; Determines the order of acquisition when 'mc' macro is used.

define loopcounter ncyc
   "ncyc = l7"

#ifdef oneDarray
#else
define loopcounter ni
       " ni = td1/2"
define loopcounter zetacount
       "zetacount=1"
define loopcounter ni2
       "ni2 = td2/2"
#endif

/* Assign cnsts to check validity of parameter range */
#ifdef fsat
  "cnst10 = plw10" ; tsatpwr - set max at 0.8 W  
#endif
  "cnst12=plw12" ; tpwrml - set max at 0.8W
  "cnst22=plw22" ; dpwrdip - set max at 65W
  "cnst23=plw23" ; dpwrcodec - set max at 10.0W
  "cnst24=plw24" ; dpwrcob - set max at 11.0W
  "cnst25=plw25" ; dhpwrcob - set max at 52.0W
  "cnst26=plw26" ; dpwrcadec - set max at 2.0W
  "cnst27=plw27" ; dpwrcbdec - set max at 2.0W
  "cnst28=spw25" ; dhpwrcob - set max at 52.0W
  "cnst29=spw30" ; dhdpwrcob - set max at 52.0W
  "cnst31=plw31" ; dpwr2 - set max at 6W
#ifdef Ddec
  "cnst4=plw4" ; dpwr3 pl4 - set max at 10.5W for 2H pulses
  "cnst41=plw41" ; dpwr3dec pl41 - set max at 1.5W
#endif

/* BEGIN ACTUAL PULSE SEQUENCE */

1 ze

; check validity of parameters

  if "d0 < 0.2u "
  {
   "d0=0.2u"
  }

  if "d10 < 0.2u "
  {
   "d10=0.2u"
  }

#ifdef fsat
   if "cnst10 > 0.5" 
  {
   2u
   print "error: tsatpwr, pl10 is incorrect"
   goto HaltAcqu
  }
#endif

  if "p22 < 24u" 
  {
   2u
   print "error: pwcdip p22 incorrect"
   goto HaltAcqu
  }

  if "cnst12 > 1.25"
  {
   2u
   print "error: tpwrml pl12 incorrect"
   goto HaltAcqu
  }

  if "cnst22 > 37.0"
  {
   2u
   print "error: dpwrdip pl22 incorrect"
   goto HaltAcqu
  }

  if "cnst23 > 10.0"
  {
   2u
   print "error: dpwrcodec pl23/spw23 for CO seduce dec incorrect"
   goto HaltAcqu
  }

  if "cnst24 > 12.0"
  {
   2u
   print "error: dhpwrb pl24 incorrect"
   goto HaltAcqu
  }

  if "cnst25 > 60.0"
  {
   2u
   print "error: dvhpwrb pl25 incorrect"
   goto HaltAcqu
  }

  if "cnst28 > 60.0"
  {
   2u
   print "error: spw25 incorrect"
   goto HaltAcqu
  }

  if "cnst29 > 60.0"
  {
   2u
   print "error: spw30 incorrect"
   goto HaltAcqu
  }

  if "cnst26 > 8.0"
  {
   2u
   print "error: dpwrcadec pl26/spw26 for Ca seduce(90) dec incorrect"
   goto HaltAcqu
  }

  if "cnst27 > 2.0"
  {
   2u
   print "error: dpwrcbdec pl27/spw27 for Cb wurst(90) dec incorrect"
   goto HaltAcqu
  }

  if "cnst31 > 6.0"
  {
   2u
   print "error: dpwr2 pl31 incorrect"
   goto HaltAcqu
  }

  if "ncyc > 9"
  {
   2u
   print "error: ncyc is too large"
   goto HaltAcqu
  }

  if "pwcdip*94.22*ncyc > 30m"
  {
   2u
   print "error: dipsi time is too large"
   goto HaltAcqu
  }

#ifdef oneDarray
#else

if "in0*2*(ni-1) > 8.2m"
  {
   2u
   print "error: acq time in t1 is too large"
   goto HaltAcqu
  }
#endif /* end of oneDarray */

#ifdef Ddec
  if "cnst4 > 10.5"
  {
   2u
   print "error: dpwr3 pl4 too large"
   goto HaltAcqu
  }

  if "cnst41 > 2.0"
  {
   2u
   print "error: dpwr3dec pl41 too large"
   goto HaltAcqu
  }

  if "pwd < 100.0u"
  {
   2u
   print "error: pwd is too short > 100 us"
   goto HaltAcqu
  }

  if "pwddec < 300.0u"
  {
   2u
   print "error: pwddec is too short > 300 us"
   goto HaltAcqu
 }

;  d11  LOCKDEC_ON
  50u LOCKH_ON    ; turn on lock hold
  d11 H2_PULSE    ; put lock to pulse mode
  2u pl41:f4
#endif

2 d11 do:f3

#ifdef Ddec    /* D decoupling */
d11 H2_LOCK    ; put lock channel in lock mode
6m LOCKH_OFF   ; turn off lock hold

#ifdef fsat                           ; zgoptn -Dfsat
  4u pl10:f1                          ; power(tsatpwr) for presaturation
  d1 cw:f1 zero                       ; Hcw(d1)x
  4u do:f1                            ; cw off
  2u pl1:f1                           ; power(tpwr)

#ifdef fscuba                   /* Scuba pulse sequence */
   hscuba                          ; delay(hscuba)
    (pwh zero):f1                  ; H 90x180y90x
    (pwh*2 one):f1
    (pwh zero):f1
   hscuba                          ; delay(hscuba)
#endif                           /* end fscuba */

#else                             /* if fsat is no */
 2u pl1:f1                        ; power(tpwr)
 d1                               ; delay(d1)
#endif                            /* end if fsat */

50u  LOCKH_ON
15u H2_PULSE

#else    /* no D decoupling */

#ifdef fsat                           ; zgoptn -Dfsat
  4u pl10:f1                          ; power(tsatpwr) for presaturation
  d1 cw:f1 zero                       ; Hcw(d1)x
  4u do:f1                            ; cw off
  2u pl1:f1                           ; power(tpwr)

#ifdef fscuba                   /* Scuba pulse sequence */
   hscuba                          ; delay(hscuba)
    (pwh zero):f1                  ; H 90x180y90x
    (pwh*2 one):f1
    (pwh zero):f1
   hscuba                          ; delay(hscuba)
#endif                           /* end fscuba */

#else                             /* if fsat is no */
 2u pl1:f1                        ; power(tpwr)
 d1                               ; delay(d1)
#endif                            /* end if fsat */

#endif                            /* end of D_decoupling */

  2u pl3:f3
  2u fq=0:f2                             ;13C SFO2 @ 43ppm
  2u pl2:f2                              ;power for C90
  2u pl1:f1   

; ensure magnetization originates on 1H not on C or N
  (pwc zero):f2  
  2u
  (pwn zero):f3  

#ifdef Ddec
  20u UNBLKGRAMP ; this unblanks the gradients, lock is already in hold mode from above
#else
  20u UNBLKGRAD  ; this unblanks the gradients and puts lock in hold mode
#endif

  2u
  (p50:gp0)                      
  d16

; This is the real start

  (pwh zero):f1                                 ; H90x

  2u
  p51:gp1                                       ; gradient 1
  d16 

  "DELTA = taua - 2.0u - p51 - d16"
   DELTA                                         ; dly 1/4JCH

  (center (pwh*2 ph26):f1 (pwc*2 ph26):f2)        ; H180xC180x

   DELTA                                         ; dly 1/4JCH

  2u
  p51:gp1                                       ; gradient 1
  d16

  (pwh one):f1                                  ; H90y


/* start 2H decoupling if desired */

#ifdef Ddec
  2u pl4:f4
  (pwd one):f4
  2u pl41:f4
  (2u zero):f4
  (2u cpds4 zero):f4                          ;2H dec ON
#endif

2u

/* Bax Logan conditions*/

#ifdef oneDarray
  "zeta1 = 0.2u"
#else

#ifdef Ddec
  if "ni > 1" {
      "zeta = (taub - 18.0u - p52 - d16 - pwd - 5u)/(ni - 1)"
    }
   else {
      "zeta = 0.1u"
  }

#else
  if "ni > 1" {
      "zeta = (taub - 10.0u - p52 - d16 - 5u)/(ni - 1)"
    }
   else {
      "zeta = 0.1u"
  }
#endif

  if " zeta < 0.1u "
  {
   2u
   print "error: problem with zeta"
   goto HaltAcqu
  }

#ifdef f1180
   "d30 = d0 - in0/2"
   "zetacount = trunc(d30/in0 + 0.4)"
   "zeta1 = zeta*zetacount"
#else
   "zetacount = trunc(d0/in0 + 0.4)"
   "zeta1 = zeta*zetacount"
#endif

if "zeta > in0" {
     "zeta1 = 0.2u"
}

/* end of Bax Logan conditions*/
#endif    /* end of 1 D array */

  (pwc ph1):f2                                  ; C90(ph1)

  2u
  p52:gp2                                       ; Gradient 2
  d16 pl23:f2                                   ; power for CO dec 

  /* Turn ON CO seduce decoupling */
  (2u cpds5 zero):f2                            ; CO dec ON (off res seduce)

  d0                                                ; t1/2

  (pwn*2 zero):f3                                    ; N180x

#ifdef Ddec
  "DELTA = taub - 2u - p52 - d16 - 2u - pwn*2 - pwh*2 - 6u - pwd - 2u"   
   DELTA
#else
  "DELTA = taub - 2u - p52 - d16 - 2u - pwn*2 - pwh*2 - 4u"   
   DELTA
#endif

  (pwh*2 zero):f1                                    ; H180x
  
  "DELTA = d0 - zeta1"
   DELTA

/* CO decoupling off */
  2u do:f2                                      ; CO dec off     

#ifdef Ddec
  2u do:f4                                      ; 2H dec OFF
  2u pl4:f4
  (pwd three):f4
#endif

  2u pl2:f2                                          ; power for C 180
  (pwc*2 zero):f2                                    ; C 180x

  2u pl23:f2                                         ; power for CO seduce dec
  
  2u
  p52:gp2                                             ; gradient 2
  d16

#ifdef Ddec
  2u pl4:f4
  (pwd one):f4
  2u pl41:f4
  (2u zero):f4
  (2u cpds4 zero):f4                          ;2H dec ON
#endif

  /* Turn ON CO seduce decoupling */
  (2u cpds5 zero):f2                            ; CO dec ON (off res seduce)

#ifdef Ddec
  "DELTA = taub - zeta1 - 18u - p52 - d16 - pwd"
#else
  "DELTA = taub - zeta1 - 10u - p52 - d16"
#endif
  DELTA

/* Turn off CO decoupling */
  2u do:f2                                      ; CO dec off     

  2u pl2:f2                                     ; power for C90
  (pwc one):f2                                  ; C 90y

/* Turn off 2H decoupling if it was on */
#ifdef Ddec
  2u do:f4                                      ; 2H dec OFF
  2u pl4:f4
  (pwd three):f4
#endif

  (pwh two):f1                                    ; H90(-x)

  2u
  p53:gp3                                             ; gradient 3
  d16 pl22:f2                                        ; power for 13C tocsy

/* Tocsy transfer time */

  if "ncyc >= 1" 
  {
    "DELTA = pwcdip*94.22*ncyc"
    (DELTA cpds2 zero):f2                                ; cpds2="flopsy8" on
     2u do:f2                                          ; tocsy off 
   }

/* end Tocsy transfer */
 
  2u fq=cnst2:f2                           ; 13C SFO2+cnst2(Hz) @ 58ppm

  2u
  p53:gp3                                             ; gradient 3
  d16 pl24:f2                                        ; power for 13Ca90b 

  "DELTA = 3.4m - 6u - p53 - d16 "
   DELTA

/* now start 1H decoupling */

   2u pl12:f1                                       ; power for 1H dec
   (pwmlev one):f1                                  ; H90y @ powe pl12
   (2u cpds1 zero):f1                               ; waltz16x ON

#ifdef Ddec
  2u pl4:f4
  (pwd one):f4
  2u pl41:f4
  (2u zero):f4
  (2u cpds4 zero):f4                          ;2H dec ON
#endif

  (pwca90b ph2):f2                            ; Ca90b(PH2)

  2u                                         
  (pwco180b:sp25 zero):f2                            ; shaped CO180x Bloch Seigert

 /* 13Cb decoupling */ 
  2u pl27:f2                                         ; power for Cb decoupling
  (2u cpds7 zero):f2                                 ;  Cb dec ON

  "DELTA = tauc - 2u - pwco180b - 2u - 2u - 2u - 2u" 
   DELTA                                              ; dly 1/4JCaCO

/* Turn off 13Cb decoupling */
  2u do:f2                                            ; Cb dec off
  2u pl25:f2                                         ; power for Ca/CO 180b

  (pwca180b ph3):f2                                  ; Ca180(PH3)
  2u
  (pwco180b:sp25 zero):f2                            ; shaped CO180x 

/* Turn on 13Cb decoup */
  2u pl27:f2                                         ; power for Cb decoupling
  (2u cpds7 zero):f2                                 ; Cb dec ON

  "DELTA = tauc - 2u - pwco180b - 2u -2u - 2u - 2u"
   DELTA                                               ; dly 1/4JCaCO

  2u do:f2                                            ; Cb dec off
  2u pl24:f2                                         ; power for Ca 90b
  (pwca90b one):f2                                   ; Ca90y

  /* Turn OFF 1H Waltz dec */
  2u do:f1                                           ; 1H dec OFF
  /* Waltz dec off */
  (pwmlev three):f1                                  ; H90-y at pl12


/* Turn off 2H decoupling if needed */
#ifdef Ddec
  2u do:f4                                      ; 2H dec OFF
  2u pl4:f4
  (pwd three):f4
  2u pl41:f4
#endif

  2u
  p54:gp4                                             ; gradient4 
  d16 

/* now move the 13C carrier to CO */

;  2u fq=0:f2   ; jump back to 43 ppm 
  10u
  2u fq=cnst3:f2   ; jump from 43 to 176 ppm 

  2u pl24:f2                                          ; power for CO90b
  (pwco90c ph4):f2                              ;  CO90(PH4) 

  2u pl25:f2
  "DELTA = taud - pwca180c -2u" 
   DELTA
                                                ; dly 1/4JCaCO
  (pwca180c:sp30 zero):f2                                  ; Ca180x

  "DELTA = taue - taud"
   DELTA  pl25:f2                                           ; dly 1/4JNCO (-1/4JCaCO) 

  (pwco180c ph5):f2                                   ;  CO180 (PH5) 
  2u                                           
  (pwn*2 ph6):f3                                      ; N180 (PH6)

  "DELTA = taue - 2u - pwn*2 - pwca180c - 2u"
   DELTA                                                ; dly 1/4JNCO

  (pwca180c:sp30 zero):f2                                  ; Ca180x Bloch Seigert

  2u pl24:f2                                          ; power for CO90b
  (pwco90c zero):f2                                  ; CO90x

  2u
  p55:gp5                                             ; Gradient 5
  d16 

  (pwmlev one):f1                              ; H90y at power pl12
  /* Turn ON 1H Waltz dec */
  (2u cpds1 zero):f1                             ; 1H dec ON (waltz16x)

  /* Turn ON Ca seduce decoupling */
  2u pl26:f2                                    ; power forCa dec
  (2u cpds6 zero):f2                            ; Ca dec ON (on res seduce)

if "bigTN - d10 > 0.2u" {

  (pwn ph7):f3                                  ; N90(PH7)

  "DELTA = bigTN - d10"                         ; dly 1/(4JNCO) - t2/2
  DELTA

/* Turn off 13C dec */
  2u do:f2                                      ; Ca dec off 
  2u pl25:f2                                    ; power for CO180b

  (pwn*2 ph8):f3                                ; N180(PH8)
   1u
  (pwco180c zero):f2                       ; CO180x

  /* Turn ON Ca seduce decoupling */
  2u pl26:f2                                    ; power forCa dec
  (2u cpds6 zero):f2                            ; Ca dec ON (on res seduce)

  "DELTA = bigTN + 2u + 2u - 1u - pwco180c -2u -2u + d10 - 5.5m"   
  DELTA
}
else {
  (pwn ph7):f3                                  ; N90(PH7)
  1u
  (pwn*2 ph8):f3

  "DELTA = d10 - bigTN"                         ; dly 1/(4JNCO) - t2/2
  DELTA

/* Turn off 13C dec */
  2u do:f2                                      ; Ca dec off 
  2u pl25:f2                                    ; power for CO180b

  (pwco180c zero):f2                       ; CO180x

  /* Turn ON Ca seduce decoupling */
  2u pl26:f2                                    ; power forCa dec
  (2u cpds6 zero):f2                            ; Ca dec ON (on res seduce)

  "DELTA = bigTN + 1u - 2u - 2u - pwco180c -2u -2u + d10 - 5.5m"   
   DELTA
}
0.2u

  /* Turn OFF 1H decoupling */
  2u do:f1                                      ; H dec off
  (pwmlev three):f1                               ; H90-x at pl12

  "DELTA = 5.5m - 0.2u - 2u - pwmlev - 2u - 2u - 2u - p56 - 1.0m - 2u"
   DELTA

  /* Turn OFF Ca decoupling */
  2u do:f2                                    ; Ca dec off
  2u pl21:f2                                  ; lower C power

  2u
  p56:gp6                      ; gradient6 coherence selection 
  1m
  
  2u pl1:f1                                ; power for pwh

  (center (pwh ph26):f1 (pwn ph9):f3)        ; H90x,N90(ph9)

  2u pl24:f2
  (pwco90c zero):f2

  2u
  p57:gp7                                    ; gradient 7
  d16

  "DELTA = tauf - 2u - pwco90c - 2.0u - p57 - d16"            ; dly 1/4JNH
  DELTA
 
  (center (pwh*2 ph26):f1 (pwn*2 ph26):f3)   ; H180x,N180x

  "DELTA = tauf - 2.0u - p57 - d16"            ; dly 1/4JNH
  DELTA

  2u
  p57:gp7                                    ; gradient 7
  d16

  (center (pwh ph27):f1 (pwn ph29):f3)         ; H90y,N90y

  "DELTA = tauf - 2.0u - p58 - d16 - (pwn - pwh)*0.5"            ; dly 1/4JNH
  DELTA

  2u
  p58:gp8                                    ; gradient 8
  d16
 
  (center (pwh*2 ph26):f1 (pwn*2 ph26):f3)   ; H180x,N180x

  2u
  p58:gp8                                    ; gradient 8
  d16

  "DELTA = tauf - 2.0u - p58 - d16"            ; dly 1/4JNH
  DELTA

  (pwh zero):f1                              ; H90x

  "DELTA = bigT1 - pwh*2/PI"
  DELTA                                     ; dly DELTA

  (pwh*2 zero):f1

  2u
  p59:gp9*EA                                    ; gradient 9 coherence selection
  d16                                 

#ifdef Ddec
  4u BLKGRAMP                                ; Blank gradients
#else
  4u BLKGRAD                                 ; Blank gradients and lock on
#endif

  2u pl31:f3

  "DELTA = bigT1 - 2u - p59 - d16 - 4u - 2u - de"
  DELTA                                     ; dly DELTA

  go=2 ph31 cpd3:f3
  d11 do:f3 mc #0 to 2 
  F1PH(calph(ph1, +90) , calph(ph1,+180) & calph(ph31, +180) & caldel(d0, +in0)) 
  F2EA(calgrad(EA) & calph(ph9, +180) , calph(ph7, +180) & calph(ph31, +180) &  caldel(d10, +in10))

#ifdef Ddec
d11 H2_LOCK
d11 LOCKH_OFF
; d11 LOCKDEC_OFF
#endif

HaltAcqu, 1m
exit

ph1=0 2      
ph2=0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2         
ph3=0 0 2 2
ph4=0 0 2 2
ph5=0
ph6=0 2
ph7=0
ph8=0 0 0 0 2 2 2 2
ph9=0
ph31=0 2 2 0 0 2 2 0 2 0 0 2 2 0 0 2 
ph26=0
ph27=1
ph28=2
ph29=3

;cnst2 : (58-43)ppm offset in Hz
;cnst3 : (176-43)ppm offset in Hz
;pl1 : tpwr - power level for pwh
;pl10 : tsatpwr - power level for 1H presat
;pl12 : tpwrml - power level for 1H waltz16
;pl2 : dhpwr - power level for C 90 and 180
;pl21 : dpwr - low power level for C (dec)
;pl22 : dpwrdip - power level for C tocsy
;pl23 : dpwrcodec - power level for CO seduce decoupling
;pl24 : dhpwrb - power level for Ca90b/CO90b
;pl25 : dvhpwrb - power level for CO180b/Ca180b
;pl26 : dpwrcadec - power level for Ca seduce decoupling
;pl27 : dpwrcbdec - power level for sel Cb decoupling
;pl3 : dhpwr2 - power level for pwn
;pl31 : dpwr2 - power level for 15N cpd
;pl4  : power level for 2H pulses
;pl41 : power level for 2H decoupling
;sp25 : power level for pwco180b (shaped pulse) when carrier is on Ca
;sp30 : power level for pwca180c (shaped pulse) when carrier is on CO
;p1 : pwh
;p12 : pwmlev - 1H 90 for waltz16dec at power pl12
;p2 : pwc
;p22 : pwcdip - 13C 90 at pl22 for C tocsy about 30 ms
;p23 : pwCOdec - pattern length us @ spw23 
;p24 : pwCO90c, pwca90b
;p25 : pwCO180b,pwCa180b,pwCO180c,pwCa180c
;p26 : pwCadec - pattern length us @ spw26
;p27 : pwCbdec - pattern length us @ spw27
;p3 : pwn
;p31 : pwn at dpwr2 for decoupling
;p4 : 2H high power pulse, 90
;p41 : 2H decoupling
;d1 : relaxation delay
;d11 : delay for disk i/o, 30ms
;d16 : gradient recovery delay, 200us
;d14 : bigT1, 650 us
;d20 : taua, H to C, 1.8ms
;d21 : taub, refocus JHC for 13C mag
;d22 : tauc, Ca to CO transfer, 3.6 ms 
;d23 : taud, Ca-CO J refocus, 4.9 ms 
;d24 : taue, N-CO J evolve, 12.4 ms
;d25 : bigTN, t2 evolv, N-CO refocus, 12.4 ms
;d26 : tauf, 1/4JNH, ~ 2.4 ms
;d30 : dummy variable - do not adjust
;cpds1: 1H decoupling according to program defined by cpdprg1 (waltz16)
;cpds2: C decoupling for tocsy according to program defined by cpdprg2 (flopsy8)
;cpd3 : 15N decoupling according to program defined by cpdprg3 (waltz16)
;cpds4 : 2H decoupling according to program defined by cpdprg4 (waltz16)
;cpds5: CO decoupling according to program defined by cpdprg3 (onepulse.sp23 off res seduce)
;cpds6: Ca decoupling according to program defined by cpdprg4 (seduce1)
;cpds7: Cb decoupling according to program defined by cpdprg7 (wurst2)
;pcpd3: 1/dmf2 - 90 degree pulse for cpd3
;l7 : ncyc, number of times flopsy is repeated; total_time = pwcdip*94.22*ncyc
;spnam23 : File name for CO decoupling sitting at 43 ppm
;spnam25 : File name for D/sq(3), +118p
;spnam26 : File name for Ca decoupling during 15N t2
;spnam27 : File name for Cb decoupling during Ca to Co transfer
;spnam30 : File name for Ca D/sq(3), -118p
;cpdprg2 : flopsy transfer
;cpdprg5 : CO decoupling while sit at 43 ppm
;cpdprg6 : Ca decoupling while carbon carrier at 176 ppm (mag is 15N)
;cpdprg7 : Cb decoupling while sit at 58 ppm
;zgoptns : Df1180,Df2180,DDdec, DoneDarray 

