Compare commits
No commits in common. "2719d49eb0d0e242c145bed12dc9e291e52ac18b" and "565d6e5318ea9dcbeff15b905eb97403294b8ac6" have entirely different histories.
2719d49eb0
...
565d6e5318
@ -1,15 +0,0 @@
|
||||
from collections import deque
|
||||
|
||||
from pyrelacs.util.logging import config_logging
|
||||
|
||||
log = config_logging()
|
||||
|
||||
|
||||
class DataBuffer:
|
||||
def __init__(self, channels, samples):
|
||||
self.channels = channels
|
||||
self.samples = samples
|
||||
|
||||
def create_buffer(self):
|
||||
max_len_buffer = self.channels * self.samples
|
||||
self.buffer = deque(maxlen=max_len_buffer)
|
@ -11,7 +11,7 @@ from pyrelacs.util.logging import config_logging
|
||||
log = config_logging()
|
||||
|
||||
|
||||
class MccDaq:
|
||||
class MccDac:
|
||||
"""
|
||||
Represents the Digital/Analog Converter from Meassuring Computing.
|
||||
provides methods for writing and reading the Analog / Digital input and output.
|
||||
@ -43,7 +43,6 @@ class MccDaq:
|
||||
except uldaq.ul_exception.ULException:
|
||||
self.disconnect_dac()
|
||||
self.connect_dac()
|
||||
|
||||
self.ai_device = self.daq_device.get_ai_device()
|
||||
self.ao_device = self.daq_device.get_ao_device()
|
||||
self.dio_device = self.daq_device.get_dio_device()
|
@ -9,7 +9,7 @@ import matplotlib.pyplot as plt
|
||||
from scipy.signal import welch
|
||||
from scipy.signal import find_peaks
|
||||
|
||||
from pyrelacs.devices.mccdaq import MccDaq
|
||||
from pyrelacs.devices.mccdac import MccDac
|
||||
from pyrelacs.util.logging import config_logging
|
||||
|
||||
log = config_logging()
|
||||
@ -17,7 +17,7 @@ log = config_logging()
|
||||
faulthandler.enable()
|
||||
|
||||
|
||||
class Calibration(MccDaq):
|
||||
class Calibration(MccDac):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.SAMPLERATE = 40_000.0
|
||||
|
@ -11,20 +11,19 @@ from PyQt6.QtWidgets import (
|
||||
QStatusBar,
|
||||
)
|
||||
import uldaq
|
||||
import numpy as np
|
||||
import nixio as nix
|
||||
import pyqtgraph as pg
|
||||
|
||||
from pathlib import Path as path
|
||||
from scipy.signal import welch, find_peaks
|
||||
|
||||
from pyrelacs.worker import Worker
|
||||
from pyrelacs.repros.repros import Repro
|
||||
from pyrelacs.dataio.buffer import DataBuffer
|
||||
|
||||
from pyrelacs.util.logging import config_logging
|
||||
from pyrelacs.ui.about import AboutDialog
|
||||
from pyrelacs.ui.plots.calibration import CalibrationPlot
|
||||
|
||||
from pyrelacs.util.logging import config_logging
|
||||
|
||||
log = config_logging()
|
||||
_root = path(__file__).parent.parent
|
||||
|
||||
@ -52,7 +51,6 @@ class PyRelacs(QMainWindow):
|
||||
self.threadpool = QThreadPool()
|
||||
self.repros = Repro()
|
||||
|
||||
self.buffers = DataBuffer(channels=1, samples=100_000)
|
||||
self.text = QPlainTextEdit()
|
||||
self.text.setReadOnly(True)
|
||||
|
||||
@ -181,6 +179,9 @@ class PyRelacs(QMainWindow):
|
||||
except uldaq.ul_exception.ULException as e:
|
||||
log.error(f"Could not Connect to DAQ: {e}")
|
||||
self.daq_connect_button.setDisabled(True)
|
||||
else:
|
||||
log.debug("Already handeld the error")
|
||||
pass
|
||||
|
||||
def disconnect_dac(self):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user