Analytic Z-spectra water, CEST - pulsed spin-lock
Here you find analytic solutions of the Bloch-McConnell equations describing Z-spectra under pulsed spin-lock irradiation. This is the R1ρ-based ISAR2-model as published in Roeloffs et al. (2014), NMR Biomed., 28, 40–53, doi: 10.1002/nbm.3192.. 
It is a very lean code to give you a tool illustrating the principal behaviour of a CEST effect and its interaction with the direct water saturation.
Download zipped Matlab implementations here or find the package on github.com/cest-sources/Z-pSL
Short Documentation
BATCH_Z_cw
First the pool parameters are defined in the parameter struct P:
%% SETUP
%pool system parameters
%water pool A
P.R1A=1/3; % longitudinalrelaxation rate [s^-1]
P.R2A=2; % transversal relaxation rate [s^-1]
P.dwA=0; %deltaW_A in [ppm]
%CEST pool B
P.fB=0.001; % proton fraction: [water protons]/[CEST agent protons]
P.kBA=200; % exchange rate [s^-1]
P.dwB=1.9; % (chemical shift) deltaW_B in [ppm}
P.R2B=30; % transversal relaxation rate [s^-1]
Now the CEST sequence parameters are defined
% sequence parameters
P.Zi=1; % Z initial, in units of thermal M0, Hyperpol.: 10^4
P.FREQ=300; % [MHz] I use ppm and µT, therefore gamma=267.5153;
P.B1=2; % [µT]
P.tp=5; % pulse duration = saturation time [s]
P.xZspec= [-5:0.1:5]; % ppm
Now the function Z_cw(P) is called and plotted:
figure(32), plot(P.xZspec,Z_cw(P),'r-') ; hold on;
function Z_cw(P)
powered by DKFZ