diff --git a/pyrelacs/ui/mainwindow.py b/pyrelacs/ui/mainwindow.py index ef67fe4..ebd0589 100644 --- a/pyrelacs/ui/mainwindow.py +++ b/pyrelacs/ui/mainwindow.py @@ -13,10 +13,6 @@ from PyQt6.QtWidgets import ( QStatusBar, ) -from pglive.sources.data_connector import DataConnector -from pglive.sources.live_plot import LiveLinePlot -from pglive.sources.live_plot_widget import LivePlotWidget - import uldaq import nixio as nix import pyqtgraph as pg @@ -78,8 +74,12 @@ class PyRelacs(QMainWindow): widget.setLayout(layout) self.setCentralWidget(widget) - SAMPLERATE = 1_000 - BUFFERSIZE = 1_0000 + SAMPLERATE = 40_000 + start = time.time() + BUFFERSIZE = SAMPLERATE * 10 * 60 + end = time.time() + log.debug(f"Buffer allocation took {end - start}") + self.buffer = CircBuffer(size=BUFFERSIZE, samplerate=SAMPLERATE) # self.connect_dac() @@ -222,7 +222,7 @@ class PyRelacs(QMainWindow): def stop_recording(self): self.add_to_textfield("pressed") - self._stop_recording.setEnabled(False) + # self._stop_recording.setEnabled(False) self.sin_producer.stop_request() self.continously_plot.stop_plotting()