Skip to content
Snippets Groups Projects
Commit f0319d89 authored by Sander de Snoo's avatar Sander de Snoo
Browse files

Fixed acquisition to allow simultaneous acquisition by combining segments (QConstruct simultaneous)

parent 30bb03a5
No related branches found
No related tags found
No related merge requests found
......@@ -113,11 +113,8 @@ class acquisition_data(parent_data):
self.end_time = max(self.end_time, time + other.end_time)
def __copy__(self):
"""
make a copy of this marker.
"""
my_copy = acquisition_data()
my_copy.data = copy.copy(self.data)
my_copy.data = copy.deepcopy(self.data)
my_copy.start_time = copy.copy(self.start_time)
my_copy.end_time = copy.copy(self.end_time)
......@@ -138,8 +135,7 @@ class acquisition_data(parent_data):
data_copy_shifted = copy.copy(self)
for i in range(len(data_copy_shifted.data)):
data_copy_shifted.my_data[i] = acquisition_data(data_copy_shifted.data[i].start + time_shift,
data_copy_shifted.data[i].t_mreasure)
data_copy_shifted.data[i].start += time_shift
return data_copy_shifted
......
......@@ -103,13 +103,6 @@ class segment_acquisition():
self.data_tmp.add_acquisition(acq, wait=wait)
return self.data_tmp
# @@@@ remove?
# def __add__(self, other):
# if (len(self._measurement_segment._measurements) > 0
# or len(other._measurement_segment._measurements) > 0):
# raise Exception(f'Measurements cannot (yet) be combined')
# return segment_acquisition(self.name, self._measurement_segment)
def append(self, other):
'''
Append a segment to the end of this segment.
......@@ -132,6 +125,13 @@ class segment_acquisition():
else:
self.__add_segment(other.data[0], time)
for m in other._measurement_segment.measurements:
if m.acquisition_channel == self.name:
m_copy = copy.copy(m)
m_copy.index = self._measurement_index
self._measurement_segment._measurements.append(m_copy)
self._measurement_index += 1
return self
@loop_controller
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment