CW Decoupling¶
In [2]:
Copied!
import numpy as np
import matplotlib.pyplot as plt
from tins import spinsys, mesolve
np.set_printoptions(precision=2, suppress=True)
import numpy as np
import matplotlib.pyplot as plt
from tins import spinsys, mesolve
np.set_printoptions(precision=2, suppress=True)
In [3]:
Copied!
I, S = spinsys(0.5, 0.5)
I, S = spinsys(0.5, 0.5)
In [4]:
Copied!
def decouple(rf):
jham = 2 * np.pi * 100 * I.z @ S.z
decham = 2 * np.pi * rf * I.x
ham = jham + decham
time = np.linspace(0, 1, 1000)
fid = mesolve(start=S.x, detect=S.p, ham=ham, time=time)
ft = fid * np.exp(-4 * time)
ft = np.fft.fftshift(np.fft.fft(ft))
return ft
def decouple(rf):
jham = 2 * np.pi * 100 * I.z @ S.z
decham = 2 * np.pi * rf * I.x
ham = jham + decham
time = np.linspace(0, 1, 1000)
fid = mesolve(start=S.x, detect=S.p, ham=ham, time=time)
ft = fid * np.exp(-4 * time)
ft = np.fft.fftshift(np.fft.fft(ft))
return ft
In [5]:
Copied!
data = [decouple(rf) for rf in np.linspace(0, 200, 50)]
data = [decouple(rf) for rf in np.linspace(0, 200, 50)]
In [7]:
Copied!
colors = [plt.cm.cool(i) for i in np.linspace(0, 1, 50)]
fig, ax = plt.subplots(figsize=(6, 6))
for i, d in enumerate(data):
ax.plot(d.real+20*i, color=colors[i])
# ax.set_xlim(400, 700)
plt.show()
colors = [plt.cm.cool(i) for i in np.linspace(0, 1, 50)]
fig, ax = plt.subplots(figsize=(6, 6))
for i, d in enumerate(data):
ax.plot(d.real+20*i, color=colors[i])
# ax.set_xlim(400, 700)
plt.show()
Q1¶
- Plot the decoupled spectrum as function of the offset of the decoupled nucleus
- Do this for different rf fields