;tractf3gpphwg
;avance-version (21/09/29)
;TRACT: Trosy for RotAtional Corlleation Times
;pseudo 2D experiment to obtain a quick estimate of the rotational correlation time via  
;measurement relaxation of alpha and beta spin states
;phase sensitive 
;using f3 - channel
;water suppression using watergate sequence
;
;D. Lee, C. Hilty, G. Wider, K. Wuethrich, J. Magn. Reson. 178, 72-76 (2006)
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

prosol relations=<triple>

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


define list<delay> vd_list=<$VDLIST>


"p2=p1*2"
"p22=p21*2"
"d11=30m"
"d26=1s/(cnst4*4)"


"DELTA1=d26-p11-p19-d16-8u"
"DELTA2=d26-p11-p19-d16-8u-(larger(p1,p21)-p1)-p1*2/PI"
"DELTA3=d26-p11-p19-d16-8u-p21-de"

 
"l0=1"
"l11=0"
"d31=0"


"acqt0=0"
baseopt_echo


1 ze 
2 d11
3 d1 pl1:f1 pl3:f3
  20u
  "d31=vd_list[l11]"
  50u UNBLKGRAD
  (p21 ph0):f3
  5u
  p16:gp0
  d16
  (p1 ph0)
  4u
  (p11:sp1 ph2)
  4u
  p19:gp1
  d16 pl1:f1
  DELTA1
  (center (p2 ph1) (p22 ph0):f3 )
  4u
  DELTA1
  p19:gp1
  d16
  (p11:sp1 ph1)
  4u pl1:f1
  (p1 ph1) 

  if "l0 %2 == 1"
     {
     (p21 ph5):f3
     }
  else
     {
     (p21 ph6):f3
     }

  d31*0.5
  (p22 ph0):f3
  d31*0.5
  (p1 ph3)
  4u
  (p11:sp1 ph1)
  4u 
  p19:gp2
  d16
  DELTA1 pl1:f1
  (center (p2 ph0) (p22 ph0):f3 )
  4u
  DELTA1
  p19:gp2
  d16
  (p11:sp1 ph0)
  4u pl1:f1
  (lalign (p1 ph0) (p21 ph3):f3 )
  4u
  p19:gp3
  d16
  DELTA2
  (p11:sp1 ph2:r)
  4u pl1:f1
  (center (p2 ph0) (p22 ph0):f3 )
  4u
  (p11:sp1 ph2:r)
  DELTA3 pl1:f1
  p19:gp3
  d16
  4u BLKGRAD
  (p21 ph7):f3
  go=2 ph31
  d11 mc #0 to 2 
     F1I(iu0 & ip7*2, 2)
     F1QF(calclc(l11, 1))
exit 
  

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

;pl1 : f1 channel - power level for pulse (default)
;pl3 : f3 channel - power level for pulse (default)
;sp1: f1 channel - shaped pulse  90 degree
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel - 180 degree high power pulse
;p11: f1 channel -  90 degree shaped pulse
;p16: homospoil/gradient pulse  [1msec]
;p19: homospoil/gradient pulse2 [600 usec]
;p21: f3 channel -  90 degree high power pulse
;p22: f3 channel - 180 degree high power pulse
;d1 : relaxation delay; 1-5 * T1
;d11: delay for disk I/O                             [30 msec]
;d16: delay for homospoil/gradient recovery
;d26 : 1/(4J)YH
;cnst4: = J(YH)
;NS: 4 * n
;DS: 16
;td1: number of experiments = number of entries in VDLIST [50]
;l0: flag to switch between alpha and beta
;FnMODE: QF(no-frequency)

;define VDLIST

;this pulse program produces a ser-file (PARMOD = 2D)


;use gradient ratio:    gp 0 : gp 1 : gp 2 : gp 3
;                       80   : 19   : 15   : 32

;for z-only gradients:
;gpz0: 80%
;gpz1: 19%
;gpz2: 15%
;gpz3: 32%

;use gradient files:
;gpnam0: SINE.100 or SMSQ10.100
;gpnam1: SINE.100 or SMSQ10.100
;gpnam2: SINE.100 or SMSQ10.100
;gpnam3: SINE.100 or SMSQ10.100

;use AU-program split [2] to separate alpha and beta data into
;   different datasets

;$Id:$
