This commit is contained in:
wendtalexander 2024-09-25 16:08:58 +02:00
commit b912159b76
3 changed files with 6 additions and 5 deletions

View File

@ -94,5 +94,5 @@ if __name__ == "__main__":
SINFREQ = 10
daq_input = Calibration()
# daq_input.check_attenuator()
daq_input.check_amplitude()
# daq_input.run_calibration()
daq_input.check_attenuator()

View File

@ -208,6 +208,7 @@ class MccDac:
data_channels = np.concatenate((data, data))
db_values = [0, 0, -2, -5, -10, -20, -50]
db_values = [0, -10, -20]
for i, db_value in enumerate(db_values):
log.info(f"Attenuating the Channels, with {db_value}")
if i == 1:
@ -218,7 +219,7 @@ class MccDac:
else:
self.set_attenuation_level(db_value, db_value)
self.write_analog(
stim, ao_device = self.write_analog_dac(
data_channels,
[0, 1],
SAMPLERATE,
@ -228,7 +229,7 @@ class MccDac:
self.diggital_trigger()
try:
self.ao_device.scan_wait(uldaq.WaitType.WAIT_UNTIL_DONE, 15)
ao_device.scan_wait(uldaq.WaitType.WAIT_UNTIL_DONE, 15)
except uldaq.ul_exception.ULException:
log.debug("Operation timed out")
self.write_bit(channel=0, bit=0)

View File

@ -2,7 +2,7 @@ import ctypes
import uldaq
from IPython import embed
from pyrelacs.repros.mccdac import MccDac
from pyrelacs.repros.repos import MccDac
from pyrelacs.util.logging import config_logging
import numpy as np
import matplotlib.pyplot as plt