; pushoneshotzs
;
; Zangger-Sterk pure shift DOSYsequence
; uses push1dzs and oneshot sequence
; Uses pulse order: broadband then selective (unpublished)
; J is refocussed at centre of chunk
;
; Ralph Adams, Juan Aguilar, Robert Evans, Mathias Nilsson and Gareth Morris
; University of Manchester
; Release 1.0c (18Oct2011)
; Avance III Version
; 
; Work published using this sequence should cite:
; J.A. Aguilar, S. Faulkner, M. Nilsson and G.A. Morris, Angew. Chem. Int. Ed.; 2010, 49, 3901-3903.
;
; A one-shot sequence for high-resolution diffusion-ordered spectroscopy
; Michelle D. Pelta, Gareth A. Morris, Marc J. Stchedroff, Stephen J. Hammond 
; Magnetic Resonance in Chemistry. Volume 40 Issue 13, Pages S147 - S152
; doi: 10.1002/mrc.1107
;
;
; Other relevant papers that could be of use include:
; G.A. Morris, J.A. Aguilar, R. Evans, S. Haiber and M. Nilsson, J. Am. Chem. Soc.; 2010, 132, 12770 - 12772.
; M. Nilsson and G.A. Morris, Chem. Commun.; 2007, 9, 933 - 935.
; 
; Data can be reconstructed using the 'pshift' macro. This produces a set of
; attenuated pure shift spectra



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

define list<gradient> diff=<Difframp>
define delay tauA
define delay tauB
define delay tauC


"in0=inf1/2"
"p2=p1*2"; 180 and 90 degree pulses

;ZanggerSterk delays

"tauA=in0/2-p16-d16-50u"
"tauB=in0-p16-d16-300u"
"tauC=in0/2-p16-d16-350u-(dw*2)-(dw*2*cnst4)-de"

;Doneshot delays

"cnst15=1+cnst14"  ; 1 + alpha
"cnst16=1-cnst14"  ; 1 - alpha
"DELTA=d20-4.0*p1-4*p30-5.0*d16-p19" ; diffusion encoding delay

aqseq 312


1 ze
2 d1 pl1:f1
	50u UNBLKGRAD

; Doneshot sequence

3 p19:gp2*-1.0					; Spoiler gradient balancing pulse
  d16
   
  p1 ph1					; 1st 90
  p30:gp1*cnst16*diff  				; +(1 - alpha)
  d16   
  
    
  p2 ph2					; First 180
  p30:gp1*-1*cnst15*diff			; -(1 + alpha)
  d16
  
  p1 ph3					; 2nd 90
  p30:gp1*2*cnst14*diff				; Lock refocusing pulse pulse, +(2*alpha)
  d16
  
  p19:gp2					; Spoiler gradient balancing pulse
  d16 
  
  DELTA 					; diffusion encoding delay
  
  p30:gp1*2*cnst14*diff				; Lock refocusing pulse, +(2*alpha)
  d16 
  
  p1 ph4					; 3rd 90
  p30:gp1*cnst16*diff  				; +(1 - alpha)
  d16
    
  p2 ph5					; 2nd 180
  p30:gp1*-1*cnst15*diff			; -(1 + alpha)
  d16
    
; Zangger-Sterk sequence

4 d0

  tauA  
  50u 
  
  p16:gp3*0.5							; First gradient pulse
  d16 
  
  	p2 ph6							; Hard ZS 180

  tauB
  
  p16:gp3*-0.5
  d16 
  
	300u gron0						; Slice selection gradient On
	p12:sp2:f1 ph7						; Selective ZS 180
	200u
	100u groff						; Slice selection gradient Off
		
  p16:gp3*-1.0
  d16

  50u BLKGRAD
  tauC
 
  d0  
 				

5 go=2 ph31
  d1 mc #0 to 2
     F1QF(id0)
     F2QF(rd0, igrad diff)

exit

;ph1  		; 1st 90 
;ph2		; 1st 180
;ph3		; 2nd 90
;ph4		; 3rd 90
;ph5		; 2nd 180
;ph6		; Selective ZS 180
;ph7		; Hard ZS 180

;ph31		; Receiver ph31= ph1 + ph6*2+ ph7*2

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

;gp0		;slice selective gradient
;gp1		;diffusion encoding gradient
;gp2 		;spoiler gradien
;gp3		;ZS CTP gradients

;p1		;90 degree rf pulse width
;p2		;180 degree rf pulse width
;p12		;selective ZS pulse width
;p16		;ZS CTP gradient width
;p19		;spoiler gradient width
;p30		;diffusion encoding gradient width


;pl1 		;f1 channel - power level for hard pulse (default)
;sp2 		;f1 channel - power level for soft pulse 
;spoffs2 	;selective pulse offset (0 Hz)
;spnam2 	;file name for selective pulse

;d0		;incremented delay
;d1 		;relaxation delay; 1-5 * T1
;d16		;gradient stabilisation delay
;d20		;diffusion encoding delay

;td1		;number of chunks to acquire
;cnst4		;number of points to drop when collecting FI

;NS: 
;DS: 
;td1: number of experiments
;
;FnMODEs: QF
;Use AU program 'dosy' to calculate gradient levels

; ---Instructions---
; 
;pulse sequence = 90 - 0.5*t1 - tauA - 180H - tauB - 180ZS - tauC - 0.5*t1 - acquire
;
;(1) calibrate 90 degree hard pulse as normal
;(2) calibrate selective pulse using 'stdisp'
;(a) Calculate bandwidth
;this requires required bandwidth(Hz) and required rotation to produce a bandwidth (s)
;(b) Integrate shape
;this requires the bandwidth (s), required rotation and gives a change in power
;
;swh in F2 is an integer multiple of swh in F1
;


