# 1 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
;cest_1Hau.kb
;this program should be started by cestau.zg
;this program uses two python scripts powercal_kb.py and tsgenpts_CEST_kb.py
;User needs to input the following values in ased
;CNST10, CNST11, CNST12, CNST13
;UPDATE THE RIGHT 90 DEGREE PULSE @ p1 and pldb1 @ plw1
;lc1prf2.kb base file
;implementing no plw9, d1 and saturation pulse separately
;modified from lc1prf2 file
;avance-version (12/01/11)
;with double presaturation during relaxation delay
;presaturation using f1 and f2 - channel
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=


;prosol relations=<lcnmr>
# 1 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl" 1
;Avance4.incl
;   for AV 4
;
;avance-version (16/08/18)
;
;$CLASS=Common Incl
;$COMMENT=


# 19 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"
;setrtp0 denotes TimingController


# 50 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"
# 51 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"


# 63 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"
# 89 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"
# 90 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"


# 123 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"
;#define LOWQ
;#define HIGHQ


;#define MIX_UP
;#define MIX_DOWN
# 136 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/Avance.incl"
;$Id:$
# 25 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb" 2

;------------1H pulses----------
;p1 = 90 deg high power pulse @ plw1 (pldb1) (refernce)
;pl1 = power for 90 deg 1H pulse

;ref_length = p1 
;ref_power = plw1
;ref_atten = -10*log10(ref_power) = pldb11
;ref_freq = 1000000/(4*ref_length) = Hz
;length = ref_length*ref_freq/cnst13
;pldb21 = =ref_atten-20*log10(ref_length/length)
# 37 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
;pl21 = power for saturation pulse on O2 via F2list
;this shoulbe calculated from p1, pl1 and cnst13

;l1 = ref freq in Hz calculated from p1 (90 deg Proton)
;l2 = X length of the pulse calculated from cnst13
;cnst13 = input entered by user via ased, strength of the pulse to be irradiated
;l3 = X power calculated in dB

;"l1=1000000/(4*p1)"
;"l2=p1*l1/cnst13"
;"l3=-11.83-20*log10(p1/l2)"
;"plw21=pow(10,-l3/10)"
# 51 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
;for CEST experiments Frq list needs to be defined
define list<frequency> f2_list=<$FQ2LIST>

"d11=30m"
"d12=20u"
"d13=4u"
"d5=1s/(cnst10*cnst11*cnst12*cnst13)"

"acqt0=-p1*2/3.1416"
# 62 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
;"l11=0" ;for CEST


# 65 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
1 ze
  d12 pl21:f2
2 30m
  d5
  d12 pl9:f1
  d1 
  d2 cw:f2 ph29 
; removed cw:f1 ph29 
  4u f2_list:f2
  d13 do:f1 do:f2
  d12 pl1:f1
  p1 ph1
  go=2 ph31
; 30m mc #0 to 2 F0(zd)
  30m wr #0 if #0 f2_list.inc
  lo to 1 times td1
exit
# 84 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
ph1=0 2 2 0 1 3 3 1
ph29=0
ph31=0 2 2 0 1 3 3 1


;pl1 : f1 channel - power level for pulse (default)
;pl9 : f1 channel - power level not used (0 W)
;pl21: f2 channel - power level for saturation used by cest pulse
;p1 : f1 channel -  90 degree high power pulse
;d1 : relaxation delay;                   [ca. 1-2sec]
;d12: delay for power switching                     [20 usec]
;d13: short delay                                    [4 usec]
;ns: 4 * n, total number of scans: NS * TD0
;ds: 4
;d2 : delay for the saturation pulse
; For td1, use the number from CEST list last line number - 1
; first line in CEST (bf ppm) is not counted
; td1 should be filled with actual number of points to be recorded
# 103 "/root/.topspin-BladeEpu/local_acqu/Daan2511Biosyn/199/lists/pp/cest_19Fau.kb"
;cnst10: = enter the start of the ppm scan
;cnst11: = enter the end of the ppm scan
;cnst12: = enter how many points in total is needed between start and end of ppm scan
;cnst13: = enter effective excitation filed (10, 20, 30, 40, 50 Hz)
; d11 amp=cnst13:f2
;; to generate the Fq2list like this quinine_1H_CEST_6_2_82pts and store it in specifc directory
; location of the directory = /opt/topspin4.4.0/exp/stan/nmr/lists/f2
; to use pulse command from cnst13 and fill pldb21
;$Id:$
