;Anti z-COSY pulse sequence that has been incorporated into a stimulated echo for diffusion measurements.
;Includes suppression of ZQ and axial peaks.

#include <Avance.incl>
#include <Grad.incl>
#include <Delay.incl>


define loopcounter count
"count=td1/2"
"DELTA1=d20-p1*2-p30-d16-3u-p19-d16-3u"


1 ze
2 50u BLKGRAD
  d1 pl1:f1
3 50u UNBLKGRAD
  p1 ph1
  3u
  p30:gp6
  d16
  p1 ph2
  3u
  p19:gp7
  d16
  DELTA1
  p1 ph3
  3u
  p30:gp6
  d16
  d0
  p1*0.111 ph4
  3u pl2:f1
  300u gron0
  p11:sp1:f1 ph5
  100u groff
  30u pl1:f1
  d2
  p17:gp1
  d3
  p1*0.111 ph6
  go=2 ph31
  50u BLKGRAD
  d1 wr #0 if #0 zd

4 50u BLKGRAD
  d1 pl1:f1
5 50u UNBLKGRAD
  p1 ph7
  3u
  p30:gp6
  d16
  p1 ph8
  3u
  p19:gp7
  d16
  DELTA1
  p1 ph9
  3u
  p30:gp6
  d16
  d0
  p1*0.111 ph10
  3u pl2:f1
  300u gron0
  p11:sp1:f1 ph11
  100u groff
  30u pl1:f1
  d2
  p17:gp1
  d3
  p1*0.111 ph12
  go=4 ph14
  50u BLKGRAD
  d1 wr #0 if #0 zd

  30u id0
  lo to 3 times count
exit

ph1=0
ph2=0
ph3=0 2
ph4=0
ph5=0
ph6=0
ph7=1
ph8=1
ph9=1 3
ph10=0
ph11=0
ph12=0
ph31=0 2
ph14=0 2

;pl1 : high power
;pl2 : zero power (120 dB)
;p1 : 90 degree high power pulse
;p11 : duration of sweep
;p17 : duration of 2nd homospoil			[5 msec]
;p19 : duration of 1st homospoil			[2 msec]
;p30 : duration of refocusing gradient (little DELTA)
;d0 : incremented delay
;d1 : relaxation delay
;d2 : gradient recovery delay				[2 msec]
;d3 : gradient recovery delay				[2 msec]
;d16 : gradient recovery delay
;d20 : diffusion time (big DELTA)
;sp1 : power for sweep
;gpz0 : gradient strength for ZQ suppression
;gpz1 : gradient strength for 2nd homospoil		[50%]
;gpz6 : strength of refocusing gradient
;gpz7 : gradient strength for 1st homospoil		[37%]
;in0 : 1/(2 * SW) = DW
;nd0 : 1
;NS : 2 * n
;DS : 8
;td1 : twice the number of t1 increments
;count : actual number of t1 increments
;MC2 : States