# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"
; cptoss
;
; TS3 / 03.06.2011
;
; checked by SEWE 02.08.2011
;
; basic CP experiment with TOtal Suppresson of Sidebands 
; TOSS sequence (i.e. TOSS A or TOSS B with 2 or 2.2412 rotor revolutions, resp.)
;
; IMPORTANT NOTES:
; The last TOSS delay "de29" is corrrected for 
; the preacquisition delay "de" executed by the "go" command.
; Take this into account if modifying the pulse program.
;
;
; REFERENCES:
; Basic TOSS technique:
; W. T. Dixon, J. Schaefer, M. D. Sefcik, E. O. Stejskal, and R. A. McKay:
; "Total Suppression of Sidebands in CPMAS C-13 NMR", 
; J. Magn. Reson. 49, 341-345 (1982)
;
; Phase cycling is performed according to: 
; K. Schmidt-Rohr and H.W. Spiess:
; "Multidimensional Solid State NMR and Polymers", 
; Academic Press, London 1994, page 110
;
;
;Avance III version
;parameters:
;pl1: X power for contact
;pl2: 1H power for contact
;pl11: X power for 180 deg
;pl12: 1H power for 90 deg and decoupling
;pl13: e.g. used in spinal64_13
;p2: X 180 deg pulse at plw11
;p3: 1H 90 deg pulse at plw12
;p15: contact pulse at plw1(X) and spw0(1H)
;pcpd2 : pulse length in decoupling sequence
;d1 : recycle delay
;cnst31: MAS spin rate
;cpdprg2: decoupling, e.g. cw or tppm15
;spnam0: 1H shape for contact, e.g. ramp
;zgoptns: -Dtossa, -Dlacq, -Dlcp15 

; calculate TOSS A or B delays from the MAS spin rate cnst31
; corrected for finite pulse width and additional delays
; depends on setting of ZGOPTNS:
; use -Dtossa for TOSS A sequence, default is TOSS B
;
;
;$COMMENT=basic CP experiment with TOtal Suppresson of Sidebands
;$CLASS=Solids
;$DIM=1D
;$TYPE=cross polarisation
;$SUBTYPE=side band suppression

# 58 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"
"d31=1s/cnst31"

# 71 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"

define delay de25
"de25=0.1226s/cnst31-(p2/2.0)-1u"
define delay de26
"de26=0.0773s/cnst31-p2"
define delay de27
"de27=0.2236s/cnst31-p2"
define delay de28
"de28=1.0433s/cnst31-p2"
define delay de29
"de29=0.7744s/cnst31-(p2/2.0)-de"
# 84 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"
"acqt0=0"


# 1 "mc_line 87 file /opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss dc-measurement inserted automatically"

    dccorr
# 87 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"
1 ze
  d31
2 d1 do:f2
# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/p15_prot.incl" 1
;p15_prot.incl
;avance-version (13/01/29)
;Test the rf on-time and duty cycle
;protect against too long contact time
;Test the rf on-time and duty cycle 
;
;$CLASS=Solids INCL
;$COMMENT=protect against too long contact time


1m
if "p15 < 10.1m" goto Passp15
2u
print "contact time exceeds 10msec limit!"
goto HaltAcqu
Passp15, 1m
# 20 "/opt/topspin3.2/exp/stan/nmr/lists/pp/p15_prot.incl"
;$Id: p15_prot.incl,v 1.2.18.4 2013/01/29 15:40:51 ber Exp $
# 91 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss" 2

			;make sure p15 does not exceed 10 msec 
			;let supervisor change this pulseprogram if 
			;more is needed

# 97 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"
			;disable protection file for long acquisition change decoupling power !!! or you risk probe damage
			;if you set the label lacq (ZGOPTNS -Dlacq), the protection is disabled

# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/aq_prot.incl" 1
;aq_prot.incl
;avance-version (13/01/28)
;Test the rf on-time and duty cycle
;protect against too long acquisition time

;$CLASS=Solids INCL
;$COMMENT=protect against too long acquisition time
# 9 "/opt/topspin3.2/exp/stan/nmr/lists/pp/aq_prot.incl"
1m
if "aq < 50.1m" goto Passaq
2u 
print "acquisition time exceeds 50m limit!"
goto HaltAcqu
Passaq, 1m

;$Id: aq_prot.incl,v 1.2.18.4 2013/01/28 17:40:19 ber Exp $
# 100 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss" 2

			;allows max. 50 msec acquisition time, supervisor
			;may change  to max. 1s at less than 5 % duty cycle
			;and reduced decoupling field
# 1 "/opt/topspin3.2/exp/stan/nmr/lists/pp/rot_prot.incl" 1
;rot_prot.incl
;avance-version (13/01/29)
;Test the rf on-time and duty cycle
;protect against misset cnst31, rotation speed below 1000 Hz
;
;$CLASS=Solids INCL
;$COMMENT=protect against misset cnst31, rotation speed below 1000 Hz


1m
if "d31 < 1m" goto Passrot
2u
print "rotation period too long, cnst31 misset to less than 1000 Hz!"
goto HaltAcqu
Passrot, 1m
# 19 "/opt/topspin3.2/exp/stan/nmr/lists/pp/rot_prot.incl"
;$Id: rot_prot.incl,v 1.2.18.4 2013/01/29 15:40:51 ber Exp $
# 105 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss" 2

			;protect against misset cnst31, must be more than 1000

  (p3 pl12 ph1):f2
  (p15 pl1 ph2):f1 (p15:sp0 ph10):f2
  (de25 cpds2):f2
  (p2 pl11 ph5):f1
  de26 
  (p2 ph6):f1	
  de27
  (p2 ph7):f1
  de28
  (p2 ph8):f1
  de29
  go=2 ph31 finally do:f2		
  1m 
  wr #0
HaltAcqu, 1m
exit
# 134 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"
# 135 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"

ph0= 0
ph1= 2 0
ph2= 1 1 2 2 3 3 0 0
ph5= 1 1 2 2 3 3 0 0
ph6= 3 3 0 0 1 1 2 2
ph7= 3 3 0 0 1 1 2 2
ph8= 0 0 3 3 2 2 1 1
ph10= 3
ph31= 0 2 1 3 2 0 3 1

# 149 "/opt/topspin3.2/exp/stan/nmr/lists/pp/cptoss"
;$Id: cptoss,v 1.2.18.3 2012/10/09 09:20:42 ber Exp $
