;CLIPCOSY
;avance-version (10/02/12)
;Clean In-phase COSY
;2D H-1/H-1 correlation using in-phase transfer
;phase sensitive using states processing
;using shaped pulses for z-filter blocks
;
;$CLASS=HighRes
;$DIM=2D
;$TYPE=
;$SUBTYPE=
;$COMMENT=

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

"p2=p1*2"
"d4=1s/(cnst2*4)"
"d11=30m"
"in0=inf1"
"d0=in0/2-p1*4/3.1416"
"acqt0=-p1*2/3.1416"

1 ze 
2 d11 pl1:f1 
  d1 

;begin experiment 
  p1 ph1 UNBLKGRAD ;excitation, ph10 cycled for states
  d0

;first filter block
  p1 ph10
  4u gron1 pl0:f1
  (p23:sp23 ph8):f1
  4u groff
  d16 pl1:f1
  p1 ph2

;in-phase transfer block, planar mixing
  d4
  p2 ph20
  d4
  p1 ph20
  d4
  p2 ph3
  d4

;second filter block
  p1 ph21
  4u gron2 pl0:f1 
  (p24:sp24 ph9):f1
  40u groff
  p16:gp3
  d16 pl1:f1 BLKGRAD
  p1 ph4 ;pulse cycled with ph31

  go=2 ph31 
  d11 mc #0 to 2 
     F1PH(calph(ph1, +90), caldel(d0, +in0))
exit 

;excitation, states, TPPI
ph1 = 0 0 0 0 2 2 2 2 2 2 2 2 0 0 0 0
ph10= 0
;shape pulse phase (z-filter)
ph8 = 0 1 0 1 1 0 1 0 3 2 3 2 2 3 2 3
ph9 = 2 3 2 3 3 2 3 2 1 0 1 0 0 1 0 1
;transfer block phases
ph2 = 0
ph20= 1 3 3 1
ph3 = 3 2 3 2; any phase
ph21= 0 0 2 2
;readout/receiver phase
ph4 = 0 ; any phase
ph31= 0 2 2 0 2 0 0 2 2 0 0 2 0 2 2 0


#ifdef PCYCLE0
;excitation, states, TPPI
ph1 = 0 
ph10= 0
;shape pulse phase (z-filter)
ph8 = 0
ph9 = 2
;transfer block phases
ph2 = 0
ph20= 1
ph3 = 3; any phase
ph21= 0
;readout/receiver phase
ph4 = 0 ; any phase
ph31= 0 
#endif

#ifdef PCYCLE1
;excitation, states, TPPI
ph1 = 0 
ph10= 0
;shape pulse phase (z-filter)
ph8 = 0 1 3 2
ph9 = 2 3 0 1
;transfer block phases
ph2 = 0
ph20= 1 3 3 1
ph3 = 3 2 3 2; any phase
ph21= 0 0 2 2
;readout/receiver phase
ph4 = 0 ; any phase
ph31=0 2 2 0
#endif

#ifdef PCYCLE2
;excitation, states, TPPI
ph1 = 0 2 2 0 
ph10= 0
;shape pulse phase (z-filter)
ph8 = 0 1 3 2
ph9 = 2 3 0 1
;transfer block phases
ph2 = 0
ph20= 1
ph3 = 3; any phase
ph21= 0
;readout/receiver phase
ph4 = 0 ; any phase
ph31=0 2 2 0
#endif

#ifdef PCYCLE3
;excitation, states, TPPI
ph1 = 0 
ph10= 0 2 2 0
;shape pulse phase (z-filter)
ph8 = 0 1 3 2
ph9 = 2 3 0 1
;transfer block phases
ph2 = 0
ph20= 1
ph3 = 3; any phase
ph21= 0 2 0 2
;readout/receiver phase
ph4 = 0 ; any phase
ph31= 0 0 2 2
#endif

#ifdef PCYCLE4
;excitation, states, TPPI
ph1 = 0 
ph10= 0
;shape pulse phase (z-filter)
ph8 = 0 1 3 2
ph9 = 2 3 0 1
;transfer block phases
ph2 = 0
ph20= 1 
ph3 = 3; any phase
ph21= 0
;readout/receiver phase
ph4 = 0 2 2 0 1 3 3 1; any phase
ph31= 0 2 2 0 1 3 3 1
#endif

#ifdef PCYCLE5
;excitation, states, TPPI
ph1 = 0 0 0 0 2 2 2 2
ph10= 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
;shape pulse phase (z-filter)
ph8 = 0 1 3 2
ph9 = 2 3 0 1
;transfer block phases
ph2 = 0
ph20= 1 3 3 1
ph3 = 3 2 3 2; any phase
ph21= 0 0 2 2
;readout/receiver phase
ph4 = 0; any phase
ph31= 0 2 2 0 2 0 0 2 2 0 0 2 0 2 2 0
#endif

#ifdef PCYCLE6
;excitation, states, TPPI
ph1 = 0 0 0 0 2 2 2 2
ph10= 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2
;shape pulse phase (z-filter)
ph8 = 0 1 3 2
ph9 = 2 3 0 1
;transfer block phases
ph2 = 0
ph20= 1 3 3 1
ph3 = 3 2 3 2; any phase
ph21= 0 0 2 2
;readout/receiver phase
ph4 = 0 0 0 0 1 1 1 1; any phase
ph31= 0 2 2 0 3 1 1 3 2 0 0 2 1 3 3 1
#endif

#ifdef PCYCLE7
;excitation, states, TPPI
ph1 = 0 0 0 0 2 2 2 2 2 2 2 2 0 0 0 0
ph10= 0
;shape pulse phase (z-filter)
ph8 = 0 1 0 1 1 0 1 0 3 2 3 2 2 3 2 3
ph9 = 2 3 2 3 3 2 3 2 1 0 1 0 0 1 0 1
;transfer block phases
ph2 = 0
ph20= 1 3 3 1
ph3 = 3 2 3 2; any phase
ph21= 0 0 2 2
;readout/receiver phase
ph4 = 0 ; any phase
ph31= 0 2 2 0 2 0 0 2 2 0 0 2 0 2 2 0
#endif

;pl0 : 0W
;pl1 : power level for pulse (default)
;sp23: shaped dephasing pulse
;p1 : 90 degree high power pulse
;p2 : 180 degree high power pulse
;p23: 180 degree shaped pulse for dephasing
;p16: homospoil/gradient pulse                        [1 msec]

;p23: 1st inversion pulse for dephasing (z-filter)
;p24: 2nd inversion pulse for dephasing (z-filter)
;spnam23: 1st inversion pulse for dephasing (z-filter)
;spnam24: 2nd inversion pulse for dephasing (z-filter)
;sp23: Power level for dephasing pulse (z-filter)
;sp24: Power level for dephasing pulse (z-filter)

;d0 : incremented delay (2D)                           [3 usec]
;d1 : relaxation delay; 1-5 * T1
;d4 : 1/(4J(HH))
;d11: delay for disk I/O                               [30 msec]
;d16: delay for homospoil/gradient recovery
;cnst2: > J(HH); 30 Hz
;inf1: 1/SW(X) = 2 * DW(X)
;in0: 1/(2 * SW(X)) = DW(X)
;nd0: 2
;NS: 2 * n
;DS: 16
;td1: number of experiments
;FnMODE: States-TPPI, TPPI, States or QSEQ

;for z-only gradients:
;gpz1: 7.2% 
;gpz2: -7.5%
;gpz3: -17.9%

;use gradient files:
;gpnam3: SMSQ10.100

;Processing

;PHC0(F1): 0
;PHC1(F1): -180
;FCOR(F1): 1

;$Id: clipcosy,v 0.9 2015/07/20 16:34:17 mk Exp $
