Commit a408e718 authored by Matthieu Cattin's avatar Matthieu Cattin

Plot acquisition from pre-trig to number of points of display.

parent a58e49df
......@@ -43,19 +43,19 @@ def bit2string(bit):
return 'NO'
def acq_plot():
"""
if(1 == m.nb_shot.value()):
trig_pos = fmc.get_trig_pos()
pre_trig = m.pre_trig_samples.value()
print('Single shot')
print('Single shot acq')
carrier_addr = ((trig_pos-pre_trig+1)<<3)
print('trig_pos:%.8X (%d) pre_trig:%.8X (%d)')%(trig_pos, trig_pos, pre_trig, pre_trig)
print('carrier addr: %.8X (%d)')%(carrier_addr, carrier_addr)
channels_data = spec_fmc.get_data(((trig_pos-pre_trig+1)<<3), (NB_POINTS*8))
channels_data = spec_fmc.get_data(carrier_addr, (NB_POINTS*8))
else:
print('Multi-shot acq')
channels_data = spec_fmc.get_data(0, (NB_POINTS*8))
"""
channels_data = spec_fmc.get_data(0, (NB_POINTS*8))
#channels_data = spec_fmc.get_data(0, (NB_POINTS*8))
print('Nb points:%d')%NB_POINTS
print('channels data length:%d')%len(channels_data)
sample = arange(len(channels_data)/4)
......@@ -144,7 +144,8 @@ def poll_timer_cb():
m.acq_stat_2.setText(fmc.get_acq_fsm_state())
m.serdes_synced.setText(bit2string(fmc.get_serdes_sync_stat()))
m.nb_samples.setText(str(fmc.get_nb_samples()))
m.trig_pos.setText(str(fmc.get_trig_pos()))
trig_pos_s = "0x%X"%fmc.get_trig_pos()
m.trig_pos.setText(trig_pos_s)
m.ch1_value.setText(str(fmc.get_current_adc_value(1)))
m.ch2_value.setText(str(fmc.get_current_adc_value(2)))
m.ch3_value.setText(str(fmc.get_current_adc_value(3)))
......
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