fixed a lot of Ruff errors and incorrect Accumulation returns in the overloaded operators
This commit is contained in:
@@ -7,7 +7,6 @@ from .DamarisFFT import DamarisFFT
|
||||
import threading
|
||||
import numpy
|
||||
import sys
|
||||
import types
|
||||
import datetime
|
||||
import tables
|
||||
#############################################################################
|
||||
@@ -69,8 +68,10 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
|
||||
print("Warning ADC-Result: Tried to run \"create_data_space()\" more than once.")
|
||||
return
|
||||
|
||||
if channels <= 0: raise ValueError("ValueError: You cant create an ADC-Result with less than 1 channel!")
|
||||
if samples <= 0: raise ValueError("ValueError: You cant create an ADC-Result with less than 1 sample!")
|
||||
if channels <= 0:
|
||||
raise ValueError("ValueError: You cant create an ADC-Result with less than 1 channel!")
|
||||
if samples <= 0:
|
||||
raise ValueError("ValueError: You cant create an ADC-Result with less than 1 sample!")
|
||||
|
||||
for i in range(channels):
|
||||
self.y.append(numpy.zeros((samples,), dtype="int16"))
|
||||
@@ -398,6 +399,8 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
|
||||
|
||||
r = ADC_Result(x = self.x[:], y = tmp_y, index = self.index[:], sampl_freq = self.sampling_rate, desc = self.description, job_id = self.job_id, job_date = self.job_date)
|
||||
self.lock.release()
|
||||
return r
|
||||
|
||||
else:
|
||||
raise ValueError("ValueError: Cannot multiply \"%s\" to ADC-Result!") % str(other.__class__)
|
||||
|
||||
@@ -450,6 +453,7 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
|
||||
|
||||
r = ADC_Result(x = self.x[:], y = tmp_y, index = self.index[:], sampl_freq = self.sampling_rate, desc = self.description, job_id = self.job_id, job_date = self.job_date)
|
||||
self.lock.release()
|
||||
return r
|
||||
else:
|
||||
raise ValueError("ValueError: Cannot multiply \"%s\" to ADC-Result!") % str(other.__class__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user