In [20]:
from __future__ import division
import numpy as np
from numpy import exp
import epgcpmg as epg
import time
import matplotlib.pyplot as plt
%matplotlib inline
In [86]:
Ts = 5
T2s = np.linspace(10,500,100)
N = 32
ns = np.arange(1, N+1)
nn, tt2 = np.meshgrid(ns, T2s)
sig2 = 1
rho = 1
S1 = np.sum(exp(-2*nn*Ts/tt2), axis=1)
S2 = np.sum(nn * exp(-2*nn*Ts/tt2), axis=1)
S3 = np.sum(nn * nn * exp(-2*nn*Ts/tt2), axis=1)
CRLB = (sig2 * S1 / (2 * rho**2 * Ts**2 * T2s**(-4) * (S1*S3 - S2*S2)))
# plt.figure()
# plt.plot(ns*Ts, exp(-nn*Ts/tt2).T)
fCRLB = np.sqrt(CRLB)/T2s
# fCRLB = np.log10(CRLB)
plt.figure()
plt.plot(T2s, fCRLB)
Out[86]: