small fixes

This commit is contained in:
2026-07-09 14:45:25 +02:00
parent 26970ba201
commit 064036241b
3 changed files with 8 additions and 10 deletions
+4 -4
View File
@@ -989,14 +989,14 @@ class Accumulation(Errorable, Drawable, DamarisFFT, Signalpath):
self.lock.acquire() self.lock.acquire()
if self.sampling_rate != other.get_sampling_rate(): if self.sampling_rate != other.get_sampling_rate():
raise ValueError("Accumulation: You cant add ADC-Results with diffrent sampling-rates") raise ValueError("Accumulation: You can't add ADC-Results with different sampling-rates")
if len(self.y[0]) != len(other): if len(self.y[0]) != len(other):
raise ValueError("Accumulation: You cant add ADC-Results with diffrent number of samples") raise ValueError("Accumulation: You can't add ADC-Results with different number of samples")
if len(self.y) != other.get_number_of_channels(): if len(self.y) != other.get_number_of_channels():
raise ValueError("Accumulation: You cant add ADC-Results with diffrent number of channels") raise ValueError("Accumulation: You can't add ADC-Results with different number of channels")
for i in range(len(self.index)): for i in range(len(self.index)):
if self.index[i] != other.get_index_bounds(i): if self.index[i] != other.get_index_bounds(i):
raise ValueError("Accumulation: You cant add ADC-Results with diffrent indexing") raise ValueError("Accumulation: You can't add ADC-Results with different indexing")
for i in range(self.get_number_of_channels()): for i in range(self.get_number_of_channels()):
self.y[i] += other.y[i] self.y[i] += other.y[i]
+4 -5
View File
@@ -88,7 +88,6 @@ class logstream:
def __del__( self ): def __del__( self ):
pass pass
global log global log
log = logstream( ) log = logstream( )
sys.stdout = log sys.stdout = log
@@ -134,9 +133,6 @@ class LockFile:
return False return False
class DamarisGUI: class DamarisGUI:
ExpScript_Display = 0 ExpScript_Display = 0
ResScript_Display = 1 ResScript_Display = 1
@@ -2342,7 +2338,9 @@ class MonitorWidgets:
# now let's add a button to the toolbar # now let's add a button to the toolbar
self.matplot_cursor_button = gtk.ToggleButton(label='') self.matplot_cursor_button = gtk.ToggleButton(label='')
try: try:
image = gtk.Image.new_from_file("/usr/share/icons/breeze/actions/24/crosshairs-symbolic.svg") icon_theme = gtk.IconTheme.get_default()
icon = icon_theme.load_icon("crosshairs", 24, 0)
image = gtk.Image.new_from_pixbuf(icon)
self.matplot_cursor_button.set_image(image) self.matplot_cursor_button.set_image(image)
except: except:
pass pass
@@ -2803,6 +2801,7 @@ class MonitorWidgets:
self.matplot_cursor = matplotlib.widgets.Cursor(self.matplot_axes, self.matplot_cursor = matplotlib.widgets.Cursor(self.matplot_axes,
useblit=False, color='red', linewidth=1) useblit=False, color='red', linewidth=1)
self.matplot_canvas.draw() self.matplot_canvas.draw()
# TODO: Deactivate the pane button
else: else:
# Deactivate cursor # Deactivate cursor
-1
View File
@@ -18,7 +18,6 @@ def result():
data["test"] = r data["test"] = r
accu+=ts accu+=ts
accu.write_to_hdf(h5, "/", "name", "title") accu.write_to_hdf(h5, "/", "name", "title")
print(accu)
try: try:
h5.close() h5.close()
except: except: