Skip to content

Commit

Permalink
improve final function
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfocarobene committed Jul 18, 2024
1 parent a384dc8 commit 8706924
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extras/DAC_calibration/Calibration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,18 +299,18 @@ Final calculation
.. code:: ipython3
def maximum_power(x, func=nrz):
return (to_db(func(x), 1.01e-10) + balun_ans(x) + att_ans(x)).real
def output_power(freq, func=nrz, amplitude=1):
return (to_db(func(freq)*amplitude, 1.01e-10) + balun_ans(freq) + att_ans(freq)).real
freqs = np.array([i[0] for i in measured_nrz])*1e9
data = [i[1] for i in measured_nrz]
plt.plot(freqs, data, "o--", label="NRZ measured")
plt.plot(freqs, maximum_power(freqs, nrz), label="NRZ expected")
plt.plot(freqs, output_power(freqs, nrz), label="NRZ expected")
freqs = np.array([i[0] for i in measured_mix])*1e9
data = [i[1] for i in measured_mix]
plt.plot(freqs, data, "o--", label="MIX measured")
plt.plot(freqs, maximum_power(freqs, mix), label="MIX expected")
plt.plot(freqs, output_power(freqs, mix), label="MIX expected")
plt.xlabel("Frequency [Hz]")
plt.ylabel("Measured maximum amplitude [dBm]")
Expand Down

0 comments on commit 8706924

Please sign in to comment.