Skip to main content
. Author manuscript; available in PMC: 2016 Sep 28.
Published in final edited form as: J Magn Reson. 2011 Jan 21;209(2):352–358. doi: 10.1016/j.jmr.2011.01.017

Table 1. Pseudocode for the Iterative Soft Thresholding Processing of Ultrafast 2D NMR Data.

Input:
            G(t)- Gradient waveform (N×1); FID (N×1); k/ν1-axis grid (n×1); ν2 – the direct domain frequency vector (1×m), ε , MaxIter – maximal number of iterations
Output:
            S(k/ν1, ν2) – 2D spectrum matrix (n-by-m):
Preliminary calculations:
            k(t) – wavenumber as a function of acquisition
            t2(k) – n vectors containing the t2 points at each wavenumber k
            A¯¯k=exp(i2π(t2(k))Tv2) - n complex matrices
Initialization:
            Residual vectors r0(k)=FID(k,t2)
            Correlation vectors c0(k)=A¯¯kr0(k)
            Global threshold value λ0·max{|c0(k)|}
            Solution S0=0 of size n×m
while (p<MaxIter) and (rp2εFID2):
            Update solution Sp+1(k) = Sp(k)+δλp (cp (k))
            Calculate residual rp+1(k)=FID(k)Ak¯¯Sp+1(k)
            Calculate correlation cp+1(k)=Ak¯¯rp+1(k)
            Update threshold value λp+1·max{|cp+1(k)|}
end while
Post-processing: Inverse FT for S(k/ν1, ν2) along the direct domain; Exponential, Gaussian or
                              Lorentzian Filtering; FT for S(k/ν1, ν2) along the direct domain.