Commit 1240c04a authored by Matthieu Cattin's avatar Matthieu Cattin

Remove test code for test09.

parent 276d512e
......@@ -155,6 +155,10 @@ def acquisition(gnum, pages, fmc, channel_nb, channel_data):
page1_data = gnum.get_memory_page(1)
page_zeros = [0] * len(page1_data)
if((page1_data_before_dma == page1_data) or (page_zeros == page1_data)):
print('Previous page:')
print page1_data_before_dma[0:20]
print('Current page:')
print page1_data[0:20]
print('### Acquisition or DMA error. ###')
#raise PtsWarning('Acquisition or DMA error.')
return -1
......@@ -165,6 +169,21 @@ def acquisition(gnum, pages, fmc, channel_nb, channel_data):
channel_data = channel_data[channel_nb-1::4]
return 0
def show_result_graph(points):
pt = array(points)
freq = pt[:,0]
a_min = pt[:,1] - pt[:,2]
a_max = pt[:,1] + pt[:,2]
semilogx(freq, ch_diff[0::4], 'b', label='Channel 1')
semilogx(freq, ch_diff[1::4], 'g', label='Channel 2')
semilogx(freq, ch_diff[2::4], 'r', label='Channel 3')
semilogx(freq, ch_diff[3::4], 'c', label='Channel 4')
semilogx(freq, a_min, 'r:', label='Lower limit')
semilogx(freq, a_max, 'r:', label='Upper limit')
legend()
show()
return 0
def main (default_directory='.'):
......@@ -217,8 +236,6 @@ def main (default_directory='.'):
time.sleep(SSR_SET_SLEEP)
channel_data = []
error = acquisition(gnum, pages, fmc, i, channel_data)
if(j==1):
error -= 1
if(error != 0):
error_cnt += 1
print('RETRY: %d')%(error_cnt)
......
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