Skip to content
Snippets Groups Projects
Commit d6f0c58c authored by ratrink's avatar ratrink
Browse files

edited names, added more advanced exp.

parent 0decad88
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,16 @@ import experiment as ex #
def my_first_experiment():
exp = ex.Experiment(lo_freq=5, rx_t=3.125)
tx0_times = np.array([50, 130])
tx0_amps = np.array([0.5, 0])
event_dict = {"tx0": (tx0_times, tx0_amps)}
exp.add_flodict(event_dict)
exp.add_flodict({"rx0_en": (np.array([200, 400]), np.array([1, 0]))})
exp.plot_sequence()
plt.show()
if __name__ == "__main__":
my_first_experiment()
\ No newline at end of file
import numpy as np
import matplotlib.pyplot as plt
import pdb
st = pdb.set_trace
import external # imports external.py
import experiment as ex #
def my_first_experiment():
exp = ex.Experiment(lo_freq=5, rx_t=3.125)
event_dict = {
"tx0": (np.array([50, 130, 200, 360]), np.array([0.5, 0, 0.5j, 0])),
"tx1": (np.array([500, 700]), np.array([0.2, 0])),
"rx0_en": (np.array([400, 800]), np.array([1, 0])),
"rx1_en": (np.array([400, 800]), np.array([1, 0])),
}
exp.add_flodict(event_dict)
exp.plot_sequence()
rxd, msgs = exp.run()
exp.close_server(only_if_sim=True)
plt.figure()
plt.plot(np.abs(rxd["rx1"]))
plt.show()
if __name__ == "__main__":
my_first_experiment()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment