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 @@ ...@@ -23,7 +23,7 @@
39641.0 39641.0
>>> ch = mgr.get_samples() >>> ch = mgr.get_all_samples()
>>> ch[0][0] >>> ch[0][0]
......
...@@ -117,7 +117,7 @@ True ...@@ -117,7 +117,7 @@ True
>>> tags == tags2 >>> tags == tags2
True True
>>> print(tags[1].get_samples()[0][0]) >>> print(tags[1].get_all_samples()[0][0])
768.0 768.0
...@@ -140,7 +140,7 @@ True ...@@ -140,7 +140,7 @@ True
'name': u'B', 'end_timestamp': 8.6999999999999993}] 'name': u'B', 'end_timestamp': 8.6999999999999993}]
True True
>>> print(tss[0].get_samples()[0][0]) >>> print(tss[0].get_all_samples()[0][0])
780.0 780.0
...@@ -174,7 +174,7 @@ True ...@@ -174,7 +174,7 @@ True
def iter_first_tag(m): def iter_first_tag(m):
for st in m.iter_smart_tags(): for st in m.iter_smart_tags():
print(len(st.get_samples()[0])) print(len(st.get_all_samples()[0]))
break break
...@@ -190,7 +190,7 @@ def iter_all_tags(m): ...@@ -190,7 +190,7 @@ def iter_all_tags(m):
def tags_len_ok(tags): def tags_len_ok(tags):
for tag in tags: for tag in tags:
for i in range(23): for i in range(23):
if len(tag.get_samples()[i]) != 256: if len(tag.get_all_samples()[i]) != 256:
return False return False
return True return True
...@@ -198,7 +198,7 @@ def tags_len_ok(tags): ...@@ -198,7 +198,7 @@ def tags_len_ok(tags):
def not_duration_tags_data_len(tags): def not_duration_tags_data_len(tags):
l = 0 l = 0
for tag in tags: for tag in tags:
l += len(tag.get_samples()[0]) l += len(tag.get_all_samples()[0])
return l return l
...@@ -206,13 +206,13 @@ def not_duration_tags_data_sub(tags): ...@@ -206,13 +206,13 @@ def not_duration_tags_data_sub(tags):
"""True if data in tags are sequential - """True if data in tags are sequential -
they should be, as we have trigger-to-trigger tags they should be, as we have trigger-to-trigger tags
and data in file are sequential.""" 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 ret = True
for tag in tags: 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 j in range(td_len):
for i in range(23): for i in range(23):
td = tag.get_samples()[i] td = tag.get_all_samples()[i]
if td[j] != d + 1: if td[j] != d + 1:
print(td[j]) print(td[j])
ret = False 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