[repos/calibration] removing plots

This commit is contained in:
wendtalexander 2024-09-30 10:09:44 +02:00
parent 2e264fb582
commit 9c80091d16

View File

@ -159,87 +159,7 @@ class Calibration(MccDac):
unit="s",
)
beat = channel1 + channel2
beat_square = beat**2
f, powerspec = welch(beat, fs=self.SAMPLERATE)
powerspec = decibel(powerspec)
f_sq, powerspec_sq = welch(beat_square, fs=self.SAMPLERATE)
powerspec_sq = decibel(powerspec_sq)
peaks = find_peaks(powerspec_sq, prominence=20)[0]
f_stim, powerspec_stim = welch(channel1, fs=self.SAMPLERATE)
powerspec_stim = decibel(powerspec_stim)
f_in, powerspec_in = welch(channel2, fs=self.SAMPLERATE)
powerspec_in = decibel(powerspec_in)
# axes[0, 0].plot(
# t,
# channel1,
# label=f"{db_value} Readout Channel0",
# color=colors[i],
# )
# axes[0, 0].plot(
# t,
# channel2,
# label=f"{db_value} Readout Channel1",
# color=colors_in[i],
# )
#
# axes[0, 1].plot(
# f_stim,
# powerspec_stim,
# label=f"{db_value} powerspec Channel0",
# color=colors[i],
# )
# axes[0, 1].plot(
# f_in,
# powerspec_in,
# label=f"{db_value} powerspec Channel2",
# color=colors_in[i],
# )
# axes[0, 1].set_xlabel("Freq [HZ]")
# axes[0, 1].set_ylabel("dB")
#
# axes[1, 0].plot(
# t,
# beat,
# label="Beat",
# color=colors[i],
# )
# axes[1, 0].plot(
# t,
# beat**2,
# label="Beat squared",
# color=colors_in[i],
# )
# axes[1, 0].legend()
#
# axes[1, 1].plot(
# f,
# powerspec,
# color=colors[i],
# )
# axes[1, 1].plot(
# f_sq,
# powerspec_sq,
# color=colors_in[i],
# label=f"dB {db_value}, first peak {np.min(f_sq[peaks])}",
# )
# axes[1, 1].scatter(
# f_sq[peaks],
# powerspec_sq[peaks],
# color="maroon",
# )
# axes[1, 1].set_xlabel("Freq [HZ]")
# axes[1, 1].set_ylabel("dB")
# axes[0, 0].legend()
# axes[1, 1].legend()
# plt.show()
self.set_analog_to_zero()
self.disconnect_dac()
def decibel(power, ref_power=1.0, min_power=1e-20):