@@ -183,7 +183,7 @@ class ADC_Result(Resultable, Drawable, DamarisFFT, Signalpath):
|
||||
for i in range(self.get_number_of_channels()):
|
||||
tmp_y.append(self.y[i][start:end+1].copy())
|
||||
|
||||
r = ADC_Result(x = tmp_x, y = tmp_y, index = [(0,len(tmp_y[0])-1)], sampl_freq = self.sampling_rate, desc = self.description, job_id = self.job_id, job_date = self.job_date)
|
||||
r = ADC_Result(x = tmp_x, y = tmp_y, index = [(0,len(tmp_y[0])-1)], sampl_freq = self.sampling_rate, desc = self.description.copy() if self.description is not None else None, job_id = self.job_id, job_date = self.job_date)
|
||||
self.lock.release()
|
||||
return r
|
||||
|
||||
|
||||
@@ -118,9 +118,23 @@ class Accumulation(Errorable, Drawable, DamarisFFT, Signalpath):
|
||||
tmp_y.append(self.y[i][start:end+1])
|
||||
|
||||
r = Accumulation(x = tmp_x, y = tmp_y, n = self.n, index = [(0,len(tmp_y[0])-1)], sampl_freq = self.sampling_rate, error = self.use_error)
|
||||
if self.uses_statistics():
|
||||
r.y_square = []
|
||||
for i in range(self.get_number_of_channels()):
|
||||
r.y_square.append(self.y_square[i][start:end+1])
|
||||
if self.common_descriptions is not None:
|
||||
r.common_descriptions = self.common_descriptions.copy()
|
||||
r.time_period = self.time_period[:]
|
||||
r.job_ids = self.job_ids.copy()
|
||||
self.lock.release()
|
||||
return r
|
||||
|
||||
def get_result_by_index(self, index):
|
||||
return self.get_accu_by_index(index)
|
||||
|
||||
def get_Result_by_index(self, index):
|
||||
return self.get_accu_by_index(index)
|
||||
|
||||
def get_ysquare(self, channel):
|
||||
if self.uses_statistics():
|
||||
try:
|
||||
@@ -1032,10 +1046,10 @@ class Accumulation(Errorable, Drawable, DamarisFFT, Signalpath):
|
||||
self.set_title(self.__title_pattern % self.n)
|
||||
if hasattr(other, "is_clipped"):
|
||||
self.is_clipped = other.is_clipped
|
||||
self.common_descriptions=other.common_desriptions.copy()
|
||||
self.common_descriptions=other.common_descriptions.copy()
|
||||
self.time_period=other.time_period[:]
|
||||
self.job_id = other.job_id # added by Oleg Petrov
|
||||
self.job_ids += other.job_ids
|
||||
self.job_ids.update(other.job_ids)
|
||||
self.lock.release()
|
||||
|
||||
return self
|
||||
@@ -1066,6 +1080,7 @@ class Accumulation(Errorable, Drawable, DamarisFFT, Signalpath):
|
||||
self.time_period=[min(self.time_period[0],other.time_period[0]),
|
||||
max(self.time_period[1],other.time_period[1])]
|
||||
self.job_id = other.job_id
|
||||
self.job_ids.update(other.job_ids)
|
||||
# Removes mismatched common description keys
|
||||
if self.common_descriptions is not None and other.common_descriptions is not None:
|
||||
# Get all keys that exist in both dictionaries
|
||||
|
||||
Reference in New Issue
Block a user