#ifndef LINT static char SCCSid[] = "@(#)gmapz.c 14.1 12/08/98 Copyright (c) 1991-1996 Varian Assoc.,Inc. All Rights Reserved"; #endif /* * Varian Assoc.,Inc. All Rights Reserved. * This software contains proprietary and confidential * information of Varian Assoc., Inc. and its contributors. * Use, disclosure and reproduction is prohibited without * prior consent. */ /* - Gradient Shimming - array d3 to allow phase evolution of shim gradients if p1=0, refocus echo with +/- gradients if p1>0, refocus echo with 90-180 References: P. C. M. van Zijl et al., J. Magn. Reson. A, 111, 203-207 (1994). S. Sukumar et al., J. Magn. Reson. A, 125, 159-162 (1997). H. Barjat et al., J. Magn. Reson. A, 125, 197-201 (1997). Homospoil Gradients: gradtype='nnh' See man('gmapsys') for usage. */ #include pulsesequence() { double d3, gzlvl=0.0; d3 = getval("d3"); gzlvl = getval("gzlvl"); if (gradtype[2]=='h') if (p1==0) p1 = 2 * pw; /* --- equilibrium period --- */ status(A); delay(d1); /* --- set gradients --- */ status(B); pulse(pw, oph); /* could use shapedpulse("bir4_90_512",pw,oph,rof1,rof2) if available */ delay(1e-4+d3); if (p1 > 0) { rgradient('z',gzlvl); delay(at/2+d2); rgradient('z',0.0); delay(d2/2); pulse(p1, oph); delay(d2/2); } else { rgradient('z',-gzlvl); delay(at/2+d2); rgradient('z',0.0); delay(d2); } /* --- acq. of echo during gradient --- */ rgradient('z',gzlvl); delay(d2); /* gradient switches off at end of acq. */ }