Moku model: Moku Pro
Operating system: Windows
Software version:
Bug or support request description: I am trying to generate a simple Hahn echo sequence
Where 2 pulses are separated by 20microseconds, and the pulses are 2microseconds each.
My cose is
import time
import numpy as np
from moku.instruments import ArbitraryWaveformGenerator
IP = 'xx.xx.xx.xx'
f_mw = 10e6 # carrier frequency [Hz]
vpp = 1.0 # output amplitude [Vpp]
tau = 2 # free evolution time [s]
t_pi_over_2 = 2e-6
t_pi = 2e-6
n_pi_over_2 = max(1, int(f_mw * t_pi_over_2))
n_pi = max(1, int(f_mw * t_pi))
print(n_pi_over_2, n_pi)
awg = ArbitraryWaveformGenerator(IP, force_connect=True)
try:
# A basic sinusoidal LUT. Moku normalizes LUT data to [-1, 1]
# and then scales it with amplitude and offset.
t = np.linspace(0, 1, 100)
lut = list(np.sin(2*np.pi*t))
awg.generate_waveform(
channel=1,
sample_rate="Auto",
lut_data=lut,
frequency=f_mw,
amplitude=vpp,
offset=0.0,
interpolation=True
)
# Configure manual-triggered burst output
awg.enable_output(channel=1, enable=True)
awg.burst_modulate(
channel=1,
trigger_source="Manual",
trigger_mode="NCycle",
burst_cycles=n_pi_over_2
)
awg.enable_output(channel=1, enable=True)
# ---- First pulse: pi/2 ----
awg.manual_trigger()
# ---- Free evolution ----
time.sleep(tau)
# ---- Second pulse: pi ----
awg.burst_modulate(
channel=1,
trigger_source="Manual",
trigger_mode="NCycle",
burst_cycles=n_pi
)
awg.manual_trigger()
# ---- Wait for echo time ----
time.sleep(tau)
# Read out echo on your detector here
print("Hahn echo sequence launched.")
finally:
awg.relinquish_ownership()
the output is not at all what I gave in.
How do I go abou this pulse sequence operation.