Commit 50df65c2 authored by Aleksiej Chrabrow's avatar Aleksiej Chrabrow Committed by Joanna Duda

- cleanup read manager code, signal test generator script, display final file size

 - fix tests, use iterator in ReadManagerAmplifier
parent 99ea3f00
......@@ -23,7 +23,7 @@
39641.0
>>> ch = mgr.get_samples()
>>> ch = mgr.get_all_samples()
>>> ch[0][0]
......
......@@ -117,7 +117,7 @@ True
>>> tags == tags2
True
>>> print(tags[1].get_samples()[0][0])
>>> print(tags[1].get_all_samples()[0][0])
768.0
......@@ -140,7 +140,7 @@ True
'name': u'B', 'end_timestamp': 8.6999999999999993}]
True
>>> print(tss[0].get_samples()[0][0])
>>> print(tss[0].get_all_samples()[0][0])
780.0
......@@ -174,7 +174,7 @@ True
def iter_first_tag(m):
for st in m.iter_smart_tags():
print(len(st.get_samples()[0]))
print(len(st.get_all_samples()[0]))
break
......@@ -190,7 +190,7 @@ def iter_all_tags(m):
def tags_len_ok(tags):
for tag in tags:
for i in range(23):
if len(tag.get_samples()[i]) != 256:
if len(tag.get_all_samples()[i]) != 256:
return False
return True
......@@ -198,7 +198,7 @@ def tags_len_ok(tags):
def not_duration_tags_data_len(tags):
l = 0
for tag in tags:
l += len(tag.get_samples()[0])
l += len(tag.get_all_samples()[0])
return l
......@@ -206,13 +206,13 @@ def not_duration_tags_data_sub(tags):
"""True if data in tags are sequential -
they should be, as we have trigger-to-trigger tags
and data in file are sequential."""
d = tags[0].get_samples()[0][0] - 1
d = tags[0].get_all_samples()[0][0] - 1
ret = True
for tag in tags:
td_len = len(tag.get_samples()[0])
td_len = len(tag.get_all_samples()[0])
for j in range(td_len):
for i in range(23):
td = tag.get_samples()[i]
td = tag.get_all_samples()[i]
if td[j] != d + 1:
print(td[j])
ret = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment