; SRI experiment
;
; Selective fluorine reverse INEPT (19F-1H correlation)
;   using selective 90 19F pulse for excitation 
;   using PFG for CTP selection
; For QNP-operation (F-19 via X-QNP output of switchbox)
;
; Developed by:
;   NMR Methodology Group
;   University of Manchester
;
; L. CastaƱar, P. Moutzouri, T. Barbosa, C. Tormena, R. Rittner, A. Phillips, S. Coombes, M. Nilsson, G. A. Morris. 
;   Anal. Chem., 2018, 90, 8, 5445-5450
;   DOI: 10.1021/acs.analchem.8b00753
;
;
; Options:
;	[cnst1 = 1] with 1H purge pulses before d1
;	[cnst1 = 0] without 1H purge pulses before d1

;avance-version (2018/01/19)
;
;$CLASS=HighRes
;$DIM=1D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"d2=1s/(4*cnst2)"
"d12=20u" 
"d13=20u"
"d16=200u"
"d26=p16+d16"

"DELTA1=d2-larger(p2,p4)/2"
"DELTA2=d2-p16-d16-larger(p2,p4)/2"

"p2=p1*2"
"p4=p3*2"

"spoff11=0"

"acqt0=0"
baseopt_echo


1 ze
  30m QNP_X

2 30m 
   d13 UNBLKGRAD

 if "cnst1 == 1"		  ;Purge pulses
    { 
  d13 UNBLKGRAD 
  d12 SWITO_H 
  d13 pl1:f1
  p16:gp20
  d16
  (p1 ph20):f1
  (p1 ph21):f1 
  p16:gp21
  d16
  d13 BLKGRAD
   }
  else
   {
   }

   d1 												;F - H AP transfer
   d12 SWITO_F
   d13 UNBLKGRAD
   d13 pl0:f2 pl1:f1
  
  (p11:sp11 ph1):f2	
  
   DELTA1 pl2:f2
   
   (p3 ph3):f2
   d12 SWITO_H
   (p2 ph2):f1 
   d12 SWITO_F
   (p3 ph3):f2 
      
   DELTA2
   p16:gp1
   d16

  (p3 ph4):f2
  p16:gp2
  d16
 SWITO_H
  (p1 ph5):f1

  d26
  (p2 ph6):f1 
  p16:gp1*0.9407
  d16 

  go=2 ph31 
  30m mc #0 to 2 F0(zd)
  d13 BLKGRAD
exit

ph1=0 2 2 0 
ph2=0
ph3=0
ph4=1
ph5=0
ph6=0
ph20=0
ph21=1
ph31=0 2 2 0


;POWER LEVEL
;pl0  : zero power (0 W)
;pl1  : f1 channel - power level for pulse (default)
;pl2  : f2 channel - power level for pulse (default)
;sp11 : f2 channel - power level of excitation shaped pulse

;PULSE DURATION
;p1 : f1 channel -  90 degree high power pulse
;p2 : f1 channel -  180 degree high power pulse
;p3 : f2 channel -  90 degree high power pulse
;p4 : f2 channel -  180 degree high power pulse
;p11: f2 channel -  90 degree low power shaped pulse 
;                   choose p11 according to desired selectivity

;GRADIENT DURATION
;p16: duration of CTP gradients                      [1 ms]

;DELAY
;d1 : relaxation delay; 1-5 * T1 
;d2 : 1/(4*J(XH))
;d12: delay for QNP switch                        [20 usec] 
;d13: delay for power switch                      [20 usec] 
;d16: delay for gradient recovery	              [200 usec] 

;PULSE SHAPE
;spnam11 : f2 channel - file name for the selective 90 excitation shaped pulse		[Gauss]

;GRADIENT SHAPE
;gpnam1 : SMSQ10.100
;gpnam2 : SMSQ10.100
;gpnam20: SMSQ10.100
;gpnam21: SMSQ10.100

;GRADIENT STRENGTH
;gpz1  : F-H CTP gradient                                  [47%]
;gpz2  : homospoil gradient                             [37%]
;gpz20 : homospoil gradient purge pulses    [53%]
;gpz21 : homospoil gradient purge pulses    [59%]

;CONSTANTS 
;cnst1 : 0 (--) / 1 (Purge pulses) 
;cnst2 : J(FH)

;OTHER
;ns: 2 * n, total number of scans: NS * TD0
;ds: 2
;set O2 on resonance to the 19F signal of interest