# Grad sandw.m

From Spinach Documentation Wiki

Revision as of 12:02, 7 September 2015 by Kuprov (talk | contribs) (Created page with "Computes the effect of a gradient sandwich on the sample average density matrix using Edwards formalism. It is assumed that the effect of diffusion is negligible, that the gra...")

Computes the effect of a gradient sandwich on the sample average density matrix using Edwards formalism. It is assumed that the effect of diffusion is negligible, that the gradients are linear, and that they are antisymmetric about the middle of the sample. Syntax:

rho=grad_sandw(spin_system,L,rho,P,g_amps,s_len,g_durs,s_facs)

Arguments:

rho - spin system state vector

L - system Liouvillian

P - total propagator for all events happening between the two gradients

g_amps - row vector containing the amplitudes of the two gradients, Gauss/cm

s_len - sample length, cm

g_durs - row vector containing the durations of the two gradients, seconds

s_facs - shape factors of the two gradients, use [1 1] for square gradient pulses

Note: the function integrates over sample coordinates - subsequent gradient pulses would not refocus the magnetization that it has left defocused. More information on the subject is available in Luke's paper (http://dx.doi.org/10.1016/j.jmr.2014.01.011).