From 2aa99f6275e2530a8dd4d3be270e9d7a3633cd66 Mon Sep 17 00:00:00 2001 From: andreas128 Date: Sun, 2 Apr 2017 10:46:49 +0100 Subject: Add two tone and mer measure --- README | 5 + grc/live_analyse_dab_poly.grc | 134 +- grc/live_analyse_dab_poly.py | 76 +- grc/live_analyse_two_tone.grc | 365 +++- grc/parallel_measurement.grc | 351 ++- grc/parallel_measurement_mer.grc | 3767 +++++++++++++++++++++++++++++++++ grc/parallel_measurement_two_tone.grc | 3614 +++++++++++++++++++++++++++++++ receive_tcp.ipynb | 324 ++- src/ReceiveDictTcp.py | 10 +- src/dab_tuning_lib.py | 67 +- src/dab_util.py | 10 +- src/tcp_sync.py | 13 +- sync-measurement-while-sending.ipynb | 69 +- two_tone_tuner.ipynb | 113 +- 14 files changed, 8643 insertions(+), 275 deletions(-) create mode 100644 README create mode 100644 grc/parallel_measurement_mer.grc create mode 100644 grc/parallel_measurement_two_tone.grc diff --git a/README b/README new file mode 100644 index 0000000..c04e7f5 --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +sync-measurement-while-sending.ipynb: +Starts the parallel_measurement gnu radio script and a server to control coefficients, txgain and rxtain. + +receive_tcp.ipynb: +Receives the measurements from sync-measurement-while-sending.ipynb and controls it's parameters. diff --git a/grc/live_analyse_dab_poly.grc b/grc/live_analyse_dab_poly.grc index cddfe6e..fed59b4 100644 --- a/grc/live_analyse_dab_poly.grc +++ b/grc/live_analyse_dab_poly.grc @@ -125,7 +125,7 @@ start - -1 + -10 step @@ -133,7 +133,7 @@ stop - 1 + 10 rangeType @@ -945,69 +945,6 @@ counter_slider - - analog_sig_source_x - - amp - 1 - - - alias - - - - comment - - - - affinity - - - - _enabled - True - - - freq - shift_freq - - - _coordinate - (216, 160) - - - _rotation - 0 - - - id - analog_sig_source_x_0 - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - offset - 0 - - - type - complex - - - samp_rate - samp_rate - - - waveform - analog.GR_COS_WAVE - - blocks_complex_to_real @@ -1071,7 +1008,7 @@ file - /home/andreas/dab/ODR-StaticPrecorrection/input.dat + /home/andreas/dab/test_dat/out.iq _coordinate @@ -1204,57 +1141,6 @@ 1 - - blocks_multiply_xx - - alias - - - - comment - - - - affinity - - - - _enabled - True - - - _coordinate - (440, 113) - - - _rotation - 0 - - - id - blocks_multiply_xx_0 - - - type - complex - - - maxoutbuf - 0 - - - minoutbuf - 0 - - - num_inputs - 2 - - - vlen - 1 - - blocks_null_sink @@ -5355,12 +5241,6 @@ - - analog_sig_source_x_0 - blocks_multiply_xx_0 - 0 - 1 - blocks_complex_to_real_0 qtgui_time_sink_x_0_0 @@ -5369,7 +5249,7 @@ blocks_file_source_0 - blocks_multiply_xx_0 + dpd_memless_poly_0 0 0 @@ -5409,12 +5289,6 @@ 0 0 - - blocks_multiply_xx_0 - dpd_memless_poly_0 - 0 - 0 - dpd_memless_poly_0 blocks_multiply_const_vxx_1 diff --git a/grc/live_analyse_dab_poly.py b/grc/live_analyse_dab_poly.py index ee6d2f4..402ef17 100755 --- a/grc/live_analyse_dab_poly.py +++ b/grc/live_analyse_dab_poly.py @@ -3,7 +3,7 @@ ################################################## # GNU Radio Python Flow Graph # Title: Live Analyse Dab Poly -# Generated: Sun Jan 29 11:34:39 2017 +# Generated: Sun Mar 26 13:22:00 2017 ################################################## if __name__ == '__main__': @@ -17,7 +17,6 @@ if __name__ == '__main__': print "Warning: failed to XInitThreads()" from PyQt4 import Qt -from gnuradio import analog from gnuradio import blocks from gnuradio import eng_notation from gnuradio import gr @@ -63,12 +62,12 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): ################################################## self.samp_rate = samp_rate = 8e6 self.txgain = txgain = 80 + self.shift_freq = shift_freq = 1 self.rxgain = rxgain = 10 self.freq = freq = 222e6 - self.f_2 = f_2 = 4096000 - self.f_1 = f_1 = 4096000 self.f2 = f2 = samp_rate / 3.875 self.f1 = f1 = samp_rate / 4 + self.choose_dist = choose_dist = 1 self.ampl = ampl = 0.4 self.a_8 = a_8 = 0 self.a_7 = a_7 = 0 @@ -77,7 +76,7 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self.a_4 = a_4 = 0 self.a_3 = a_3 = 0 self.a_2 = a_2 = 0 - self.a_1 = a_1 = 0 + self.a_1 = a_1 = 1 ################################################## # Message Queues @@ -93,15 +92,9 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self._rxgain_range = Range(0, 100, 1, 10, 200) self._rxgain_win = RangeWidget(self._rxgain_range, self.set_rxgain, "rxgain", "counter_slider", float) self.top_layout.addWidget(self._rxgain_win) - self._f_2_range = Range(1, 8000000, 1, 4096000, 200) - self._f_2_win = RangeWidget(self._f_2_range, self.set_f_2, "f_2", "counter_slider", float) - self.top_layout.addWidget(self._f_2_win) - self._f_1_range = Range(1, 8000000, 1, 4096000, 200) - self._f_1_win = RangeWidget(self._f_1_range, self.set_f_1, "f_1", "counter_slider", float) - self.top_layout.addWidget(self._f_1_win) - self._ampl_range = Range(-1, 1, 0.0001, 0.4, 200) - self._ampl_win = RangeWidget(self._ampl_range, self.set_ampl, "ampl", "counter_slider", float) - self.top_layout.addWidget(self._ampl_win) + self._choose_dist_range = Range(0, 1, 1, 1, 200) + self._choose_dist_win = RangeWidget(self._choose_dist_range, self.set_choose_dist, "a_1", "counter_slider", float) + self.top_layout.addWidget(self._choose_dist_win) self._a_8_range = Range(-1, 1, 0.001, 0, 200) self._a_8_win = RangeWidget(self._a_8_range, self.set_a_8, "a_8", "counter_slider", float) self.top_layout.addWidget(self._a_8_win) @@ -123,7 +116,7 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self._a_2_range = Range(-1, 1, 0.001, 0, 200) self._a_2_win = RangeWidget(self._a_2_range, self.set_a_2, "a_2", "counter_slider", float) self.top_layout.addWidget(self._a_2_win) - self._a_1_range = Range(-1, 1, 0.001, 0, 200) + self._a_1_range = Range(-10, 10, 0.001, 1, 200) self._a_1_win = RangeWidget(self._a_1_range, self.set_a_1, "a_1", "counter_slider", float) self.top_layout.addWidget(self._a_1_win) self.uhd_usrp_source_0 = uhd.usrp_source( @@ -147,6 +140,9 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self.uhd_usrp_sink_0.set_center_freq(freq, 0) self.uhd_usrp_sink_0.set_gain(txgain, 0) self.uhd_amsg_source_0 = uhd.amsg_source(device_addr="", msgq=uhd_amsg_source_0_msgq_out) + self._shift_freq_range = Range(-8000000, 8000000, 1, 1, 200) + self._shift_freq_win = RangeWidget(self._shift_freq_range, self.set_shift_freq, "shift_freq", "counter_slider", float) + self.top_layout.addWidget(self._shift_freq_win) self.qtgui_freq_sink_x_0_0 = qtgui.freq_sink_c( 16000, #size firdes.WIN_BLACKMAN_hARRIS, #wintype @@ -191,22 +187,27 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self.dpd_memless_poly_0 = dpd.memless_poly(a_1, a_2, a_3, a_4, a_5, a_6, a_7, a_8) self.blocks_null_sink_0_2_0 = blocks.null_sink(gr.sizeof_gr_complex*1) self.blocks_null_sink_0_2 = blocks.null_sink(gr.sizeof_char*1) + self.blocks_multiply_const_vxx_2 = blocks.multiply_const_vcc((choose_dist, )) self.blocks_multiply_const_vxx_1 = blocks.multiply_const_vcc((1, )) - self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc((ampl, )) + self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc((1-choose_dist, )) self.blocks_message_burst_source_0 = blocks.message_burst_source(gr.sizeof_char*1, blocks_message_burst_source_0_msgq_in) + self.blocks_file_source_0_0 = blocks.file_source(gr.sizeof_gr_complex*1, "/home/andreas/dab/test_dat/out.iq", True) + self.blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, "/home/andreas/dab/test_dat_dist/out.iq", True) self.blocks_add_xx_0 = blocks.add_vcc(1) - self.analog_sig_source_x_1 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, f_1, 0.45, 0) - self.analog_sig_source_x_0 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, f_2, 0.45, 0) + self._ampl_range = Range(-1, 1, 0.0001, 0.4, 200) + self._ampl_win = RangeWidget(self._ampl_range, self.set_ampl, "ampl", "counter_slider", float) + self.top_layout.addWidget(self._ampl_win) ################################################## # Connections ################################################## - self.connect((self.analog_sig_source_x_0, 0), (self.blocks_add_xx_0, 1)) - self.connect((self.analog_sig_source_x_1, 0), (self.blocks_add_xx_0, 0)) - self.connect((self.blocks_add_xx_0, 0), (self.blocks_multiply_const_vxx_0, 0)) + self.connect((self.blocks_add_xx_0, 0), (self.dpd_memless_poly_0, 0)) + self.connect((self.blocks_file_source_0, 0), (self.blocks_multiply_const_vxx_2, 0)) + self.connect((self.blocks_file_source_0_0, 0), (self.blocks_multiply_const_vxx_0, 0)) self.connect((self.blocks_message_burst_source_0, 0), (self.blocks_null_sink_0_2, 0)) - self.connect((self.blocks_multiply_const_vxx_0, 0), (self.dpd_memless_poly_0, 0)) + self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_add_xx_0, 1)) self.connect((self.blocks_multiply_const_vxx_1, 0), (self.uhd_usrp_sink_0, 0)) + self.connect((self.blocks_multiply_const_vxx_2, 0), (self.blocks_add_xx_0, 0)) self.connect((self.dpd_memless_poly_0, 0), (self.blocks_multiply_const_vxx_1, 0)) self.connect((self.uhd_usrp_source_0, 0), (self.blocks_null_sink_0_2_0, 0)) self.connect((self.uhd_usrp_source_0, 0), (self.qtgui_freq_sink_x_0_0, 0)) @@ -224,8 +225,6 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self.samp_rate = samp_rate self.set_f1(self.samp_rate / 4) self.set_f2(self.samp_rate / 3.875) - self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) - self.analog_sig_source_x_1.set_sampling_freq(self.samp_rate) self.qtgui_freq_sink_x_0_0.set_frequency_range(0, self.samp_rate) self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate) self.uhd_usrp_source_0.set_samp_rate(self.samp_rate) @@ -238,6 +237,12 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self.uhd_usrp_sink_0.set_gain(self.txgain, 0) + def get_shift_freq(self): + return self.shift_freq + + def set_shift_freq(self, shift_freq): + self.shift_freq = shift_freq + def get_rxgain(self): return self.rxgain @@ -254,20 +259,6 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): self.uhd_usrp_sink_0.set_center_freq(self.freq, 0) self.uhd_usrp_source_0.set_center_freq(self.freq, 0) - def get_f_2(self): - return self.f_2 - - def set_f_2(self, f_2): - self.f_2 = f_2 - self.analog_sig_source_x_0.set_frequency(self.f_2) - - def get_f_1(self): - return self.f_1 - - def set_f_1(self, f_1): - self.f_1 = f_1 - self.analog_sig_source_x_1.set_frequency(self.f_1) - def get_f2(self): return self.f2 @@ -280,12 +271,19 @@ class live_analyse_dab_poly(gr.top_block, Qt.QWidget): def set_f1(self, f1): self.f1 = f1 + def get_choose_dist(self): + return self.choose_dist + + def set_choose_dist(self, choose_dist): + self.choose_dist = choose_dist + self.blocks_multiply_const_vxx_0.set_k((1-self.choose_dist, )) + self.blocks_multiply_const_vxx_2.set_k((self.choose_dist, )) + def get_ampl(self): return self.ampl def set_ampl(self, ampl): self.ampl = ampl - self.blocks_multiply_const_vxx_0.set_k((self.ampl, )) def get_a_8(self): return self.a_8 diff --git a/grc/live_analyse_two_tone.grc b/grc/live_analyse_two_tone.grc index 092192d..10d819c 100644 --- a/grc/live_analyse_two_tone.grc +++ b/grc/live_analyse_two_tone.grc @@ -629,7 +629,7 @@ start - -1 + -2 step @@ -637,7 +637,7 @@ stop - 1 + 2 rangeType @@ -687,7 +687,7 @@ _coordinate - (1384, 573) + (1400, 613) _rotation @@ -942,7 +942,7 @@ value - 8e6 + 8192000 @@ -1028,7 +1028,7 @@ _enabled - True + 0 freq @@ -1091,7 +1091,7 @@ _enabled - True + 0 freq @@ -1150,7 +1150,7 @@ _enabled - True + 0 _coordinate @@ -1185,6 +1185,49 @@ 1 + + blocks_complex_to_mag + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (568, 33) + + + _rotation + 0 + + + id + blocks_complex_to_mag_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + blocks_complex_to_real @@ -1228,6 +1271,61 @@ 1 + + blocks_file_source + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + file + /home/andreas/dab/dab_1s_8192000_max_1_trimmed.dab + + + _coordinate + (272, 261) + + + _rotation + 0 + + + id + blocks_file_source_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + type + complex + + + repeat + True + + + vlen + 1 + + blocks_message_burst_source @@ -1295,7 +1393,7 @@ _enabled - True + 1 _coordinate @@ -1491,7 +1589,7 @@ _coordinate - (600, 75) + (616, 75) _rotation @@ -2459,6 +2557,237 @@ -140 + + qtgui_number_sink + + autoscale + False + + + avg + 0 + + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (720, 14) + + + gui_hint + + + + _rotation + 0 + + + graph_type + qtgui.NUM_GRAPH_HORIZ + + + id + qtgui_number_sink_0 + + + type + float + + + color1 + ("black", "black") + + + factor1 + 1 + + + label1 + + + + unit1 + + + + color10 + ("black", "black") + + + factor10 + 1 + + + label10 + + + + unit10 + + + + color2 + ("black", "black") + + + factor2 + 1 + + + label2 + + + + unit2 + + + + color3 + ("black", "black") + + + factor3 + 1 + + + label3 + + + + unit3 + + + + color4 + ("black", "black") + + + factor4 + 1 + + + label4 + + + + unit4 + + + + color5 + ("black", "black") + + + factor5 + 1 + + + label5 + + + + unit5 + + + + color6 + ("black", "black") + + + factor6 + 1 + + + label6 + + + + unit6 + + + + color7 + ("black", "black") + + + factor7 + 1 + + + label7 + + + + unit7 + + + + color8 + ("black", "black") + + + factor8 + 1 + + + label8 + + + + unit8 + + + + color9 + ("black", "black") + + + factor9 + 1 + + + label9 + + + + unit9 + + + + max + 1 + + + min + -1 + + + name + "" + + + nconnections + 1 + + + update_time + 0.10 + + qtgui_time_sink_x @@ -5495,18 +5824,36 @@ 0 0 + + blocks_complex_to_mag_0 + qtgui_number_sink_0 + 0 + 0 + blocks_complex_to_real_0 qtgui_time_sink_x_0_0 0 0 + + blocks_file_source_0 + blocks_multiply_const_vxx_0 + 0 + 0 + blocks_message_burst_source_0 blocks_null_sink_0_2 0 0 + + blocks_multiply_const_vxx_0 + blocks_complex_to_mag_0 + 0 + 0 + blocks_multiply_const_vxx_0 dpd_memless_poly_0 diff --git a/grc/parallel_measurement.grc b/grc/parallel_measurement.grc index c2f077e..df2bb85 100644 --- a/grc/parallel_measurement.grc +++ b/grc/parallel_measurement.grc @@ -30,7 +30,7 @@ _coordinate - (8, 8) + (8, 14) _rotation @@ -93,7 +93,7 @@ _coordinate - (8, 229) + (8, 349) _rotation @@ -120,7 +120,7 @@ _coordinate - (8, 293) + (8, 413) _rotation @@ -147,7 +147,7 @@ _coordinate - (8, 160) + (8, 277) _rotation @@ -159,7 +159,7 @@ value - 8000000 + 8192000 @@ -174,7 +174,7 @@ _coordinate - (8, 357) + (8, 477) _rotation @@ -189,6 +189,132 @@ 60 + + analog_sig_source_x + + amp + 0.45 + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + freq + 2100000 + + + _coordinate + (48, 672) + + + _rotation + 0 + + + id + analog_sig_source_x_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + offset + 0 + + + type + complex + + + samp_rate + samp_rate + + + waveform + analog.GR_COS_WAVE + + + + analog_sig_source_x + + amp + 0.45 + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + freq + 2000000 + + + _coordinate + (48, 568) + + + _rotation + 0 + + + id + analog_sig_source_x_1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + offset + 0 + + + type + complex + + + samp_rate + samp_rate + + + waveform + analog.GR_COS_WAVE + + blks2_tcp_sink @@ -213,7 +339,7 @@ _coordinate - (1072, 15) + (1072, 135) _rotation @@ -240,6 +366,57 @@ 16384 + + blocks_add_xx + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + _coordinate + (216, 641) + + + _rotation + 0 + + + id + blocks_add_xx_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_inputs + 2 + + + vlen + 1 + + blocks_delay @@ -264,7 +441,7 @@ _coordinate - (296, 228) + (336, 348) _rotation @@ -319,7 +496,7 @@ _coordinate - (688, 124) + (688, 244) _rotation @@ -378,7 +555,7 @@ _coordinate - (808, 438) + (808, 558) _rotation @@ -417,15 +594,15 @@ _enabled - True + 1 file - /home/andreas/dab/test_dat/dab_5s_8000000.iq + /home/andreas/dab/dab_1s_8192000_max_1_trimmed.dab _coordinate - (104, 221) + (104, 213) _rotation @@ -480,7 +657,7 @@ _coordinate - (672, 236) + (672, 356) _rotation @@ -507,6 +684,108 @@ 1 + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + 1 + + + affinity + + + + _enabled + 0 + + + _coordinate + (280, 652) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + 1.5 + + + affinity + + + + _enabled + True + + + _coordinate + (200, 300) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_1 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + blocks_null_sink @@ -531,7 +810,7 @@ _coordinate - (880, 209) + (880, 329) _rotation @@ -574,7 +853,7 @@ _coordinate - (392, 347) + (432, 427) _rotation @@ -653,7 +932,7 @@ _coordinate - (880, 126) + (880, 246) _rotation @@ -708,11 +987,11 @@ frame_rate - 5 + 20 _coordinate - (880, 1) + (880, 121) _rotation @@ -787,7 +1066,7 @@ _coordinate - (1016, 238) + (1016, 358) gui_hint @@ -1062,7 +1341,7 @@ _coordinate - (808, 286) + (808, 406) gui_hint @@ -2061,7 +2340,7 @@ _coordinate - (472, 7) + (472, 127) _rotation @@ -3136,7 +3415,7 @@ _coordinate - (472, 110) + (472, 230) _rotation @@ -3287,6 +3566,24 @@ + + analog_sig_source_x_0 + blocks_add_xx_0 + 0 + 1 + + + analog_sig_source_x_1 + blocks_add_xx_0 + 0 + 0 + + + blocks_add_xx_0 + blocks_multiply_const_vxx_0_0 + 0 + 0 + blocks_delay_0 blocks_file_sink_0_0 @@ -3307,7 +3604,7 @@ blocks_file_source_0 - blocks_delay_0 + blocks_multiply_const_vxx_1 0 0 @@ -3341,6 +3638,12 @@ 0 0 + + blocks_multiply_const_vxx_1 + blocks_delay_0 + 0 + 0 + dpd_memless_poly_0 uhd_usrp_sink_0_0 diff --git a/grc/parallel_measurement_mer.grc b/grc/parallel_measurement_mer.grc new file mode 100644 index 0000000..68bf612 --- /dev/null +++ b/grc/parallel_measurement_mer.grc @@ -0,0 +1,3767 @@ + + + + Tue Jan 17 15:09:43 2017 + + options + + author + + + + window_size + + + + category + Custom + + + comment + + + + description + + + + _enabled + True + + + _coordinate + (8, 14) + + + _rotation + 0 + + + generate_options + no_gui + + + hier_block_src_path + .: + + + id + parallel_measurement_mer + + + max_nouts + 0 + + + qt_qss_theme + + + + realtime_scheduling + + + + run_command + {python} -u {filename} + + + run_options + prompt + + + run + True + + + thread_safe_setters + + + + title + + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 349) + + + _rotation + 0 + + + id + freq + + + value + 222e6 + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 413) + + + _rotation + 0 + + + id + rxgain + + + value + 10 + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 277) + + + _rotation + 0 + + + id + samp_rate + + + value + 8192000 + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 477) + + + _rotation + 0 + + + id + txgain + + + value + 60 + + + + analog_sig_source_x + + amp + 0.45 + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + freq + 2100000 + + + _coordinate + (48, 672) + + + _rotation + 0 + + + id + analog_sig_source_x_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + offset + 0 + + + type + complex + + + samp_rate + samp_rate + + + waveform + analog.GR_COS_WAVE + + + + analog_sig_source_x + + amp + 0.45 + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + freq + 2000000 + + + _coordinate + (48, 568) + + + _rotation + 0 + + + id + analog_sig_source_x_1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + offset + 0 + + + type + complex + + + samp_rate + samp_rate + + + waveform + analog.GR_COS_WAVE + + + + blks2_tcp_sink + + addr + 127.0.0.1 + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + _coordinate + (1072, 135) + + + _rotation + 0 + + + id + blks2_tcp_sink_0_0 + + + type + float + + + server + True + + + port + 47009 + + + vlen + 16384 + + + + blks2_tcp_sink + + addr + 127.0.0.1 + + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (1104, 46) + + + _rotation + 0 + + + id + blks2_tcp_sink_0_0_0 + + + type + float + + + server + True + + + port + 47009 + + + vlen + 1 + + + + blocks_add_xx + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + _coordinate + (216, 641) + + + _rotation + 0 + + + id + blocks_add_xx_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_inputs + 2 + + + vlen + 1 + + + + blocks_delay + + alias + + + + comment + + + + affinity + + + + delay + 200000 + + + _enabled + True + + + _coordinate + (336, 348) + + + _rotation + 0 + + + id + blocks_delay_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_ports + 1 + + + type + complex + + + vlen + 1 + + + + blocks_delay + + alias + + + + comment + + + + affinity + + + + delay + 210000 + + + _enabled + True + + + _coordinate + (688, 244) + + + _rotation + 0 + + + id + blocks_delay_0_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_ports + 1 + + + type + complex + + + vlen + 1 + + + + blocks_file_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + file + /home/andreas/dab/ODR-StaticPrecorrection/output_orig.dat + + + _coordinate + (808, 558) + + + _rotation + 0 + + + id + blocks_file_sink_0_0 + + + type + complex + + + unbuffered + False + + + vlen + 1 + + + + blocks_file_source + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + file + /home/andreas/dab/dab_1s_8192000_max_1_trimmed.dab + + + _coordinate + (104, 213) + + + _rotation + 0 + + + id + blocks_file_source_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + type + complex + + + repeat + True + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + 1 + + + affinity + + + + _enabled + 1 + + + _coordinate + (672, 356) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + 1 + + + affinity + + + + _enabled + 0 + + + _coordinate + (280, 652) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + 1.5 + + + affinity + + + + _enabled + True + + + _coordinate + (200, 300) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_1 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_null_sink + + alias + + + + bus_conns + [[0,],] + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (880, 329) + + + _rotation + 0 + + + id + blocks_null_sink_0 + + + type + complex + + + num_inputs + 1 + + + vlen + 1 + + + + dpd_memless_poly + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (432, 427) + + + _rotation + 0 + + + id + dpd_memless_poly_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + a1 + 1 + + + a2 + 0 + + + a3 + 0 + + + a4 + 0 + + + a5 + 0 + + + a6 + 0 + + + a7 + 0 + + + a8 + 0 + + + + blocks_file_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + file + /home/andreas/dab/ODR-StaticPrecorrection/output.dat + + + _coordinate + (880, 246) + + + _rotation + 0 + + + id + file_sink_out + + + type + complex + + + unbuffered + False + + + vlen + 1 + + + + logpwrfft_x + + avg_alpha + 1.0 + + + average + False + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + fft_size + 16384 + + + frame_rate + 20 + + + _coordinate + (880, 121) + + + _rotation + 0 + + + id + logpwrfft_x_0_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + ref_scale + 2 + + + sample_rate + samp_rate + + + + mer_all + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (840, 65) + + + _rotation + 0 + + + id + mer_all_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + + qtgui_freq_sink_x + + autoscale + False + + + average + 1.0 + + + bw + samp_rate + + + alias + + + + fc + 0 + + + comment + + + + ctrlpanel + False + + + affinity + + + + _enabled + 0 + + + fftsize + 16383 + + + _coordinate + (1016, 358) + + + gui_hint + + + + _rotation + 0 + + + grid + False + + + id + qtgui_freq_sink_x_0 + + + legend + True + + + alpha1 + 1.0 + + + color1 + "blue" + + + label1 + + + + width1 + 1 + + + alpha10 + 1.0 + + + color10 + "dark blue" + + + label10 + + + + width10 + 1 + + + alpha2 + 1.0 + + + color2 + "red" + + + label2 + + + + width2 + 1 + + + alpha3 + 1.0 + + + color3 + "green" + + + label3 + + + + width3 + 1 + + + alpha4 + 1.0 + + + color4 + "black" + + + label4 + + + + width4 + 1 + + + alpha5 + 1.0 + + + color5 + "cyan" + + + label5 + + + + width5 + 1 + + + alpha6 + 1.0 + + + color6 + "magenta" + + + label6 + + + + width6 + 1 + + + alpha7 + 1.0 + + + color7 + "yellow" + + + label7 + + + + width7 + 1 + + + alpha8 + 1.0 + + + color8 + "dark red" + + + label8 + + + + width8 + 1 + + + alpha9 + 1.0 + + + color9 + "dark green" + + + label9 + + + + width9 + 1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + name + "" + + + nconnections + 1 + + + showports + True + + + freqhalf + True + + + tr_chan + 0 + + + tr_level + 0.0 + + + tr_mode + qtgui.TRIG_MODE_FREE + + + tr_tag + "" + + + type + complex + + + update_time + 0.10 + + + wintype + firdes.WIN_BLACKMAN_hARRIS + + + ymax + 10 + + + ymin + -140 + + + + qtgui_time_sink_x + + autoscale + False + + + alias + + + + comment + + + + ctrlpanel + False + + + affinity + + + + entags + True + + + _enabled + 0 + + + _coordinate + (808, 406) + + + gui_hint + + + + _rotation + 0 + + + grid + False + + + id + qtgui_time_sink_x_0 + + + legend + True + + + alpha1 + 1.0 + + + color1 + "blue" + + + label1 + + + + marker1 + -1 + + + style1 + 1 + + + width1 + 1 + + + alpha10 + 1.0 + + + color10 + "blue" + + + label10 + + + + marker10 + -1 + + + style10 + 1 + + + width10 + 1 + + + alpha2 + 1.0 + + + color2 + "red" + + + label2 + + + + marker2 + -1 + + + style2 + 1 + + + width2 + 1 + + + alpha3 + 1.0 + + + color3 + "green" + + + label3 + + + + marker3 + -1 + + + style3 + 1 + + + width3 + 1 + + + alpha4 + 1.0 + + + color4 + "black" + + + label4 + + + + marker4 + -1 + + + style4 + 1 + + + width4 + 1 + + + alpha5 + 1.0 + + + color5 + "cyan" + + + label5 + + + + marker5 + -1 + + + style5 + 1 + + + width5 + 1 + + + alpha6 + 1.0 + + + color6 + "magenta" + + + label6 + + + + marker6 + -1 + + + style6 + 1 + + + width6 + 1 + + + alpha7 + 1.0 + + + color7 + "yellow" + + + label7 + + + + marker7 + -1 + + + style7 + 1 + + + width7 + 1 + + + alpha8 + 1.0 + + + color8 + "dark red" + + + label8 + + + + marker8 + -1 + + + style8 + 1 + + + width8 + 1 + + + alpha9 + 1.0 + + + color9 + "dark green" + + + label9 + + + + marker9 + -1 + + + style9 + 1 + + + width9 + 1 + + + name + "" + + + nconnections + 1 + + + size + 1024*64 + + + srate + samp_rate + + + tr_chan + 0 + + + tr_delay + 0 + + + tr_level + 0.0 + + + tr_mode + qtgui.TRIG_MODE_FREE + + + tr_slope + qtgui.TRIG_SLOPE_POS + + + tr_tag + "" + + + type + complex + + + update_time + 0.10 + + + ylabel + Amplitude + + + yunit + "" + + + ymax + 1 + + + ymin + -1 + + + + uhd_usrp_sink + + alias + + + + ant0 + + + + bw0 + 0 + + + center_freq0 + freq + + + norm_gain0 + False + + + gain0 + txgain + + + ant10 + + + + bw10 + 0 + + + center_freq10 + 0 + + + norm_gain10 + False + + + gain10 + 0 + + + ant11 + + + + bw11 + 0 + + + center_freq11 + 0 + + + norm_gain11 + False + + + gain11 + 0 + + + ant12 + + + + bw12 + 0 + + + center_freq12 + 0 + + + norm_gain12 + False + + + gain12 + 0 + + + ant13 + + + + bw13 + 0 + + + center_freq13 + 0 + + + norm_gain13 + False + + + gain13 + 0 + + + ant14 + + + + bw14 + 0 + + + center_freq14 + 0 + + + norm_gain14 + False + + + gain14 + 0 + + + ant15 + + + + bw15 + 0 + + + center_freq15 + 0 + + + norm_gain15 + False + + + gain15 + 0 + + + ant16 + + + + bw16 + 0 + + + center_freq16 + 0 + + + norm_gain16 + False + + + gain16 + 0 + + + ant17 + + + + bw17 + 0 + + + center_freq17 + 0 + + + norm_gain17 + False + + + gain17 + 0 + + + ant18 + + + + bw18 + 0 + + + center_freq18 + 0 + + + norm_gain18 + False + + + gain18 + 0 + + + ant19 + + + + bw19 + 0 + + + center_freq19 + 0 + + + norm_gain19 + False + + + gain19 + 0 + + + ant1 + + + + bw1 + 0 + + + center_freq1 + 0 + + + norm_gain1 + False + + + gain1 + 0 + + + ant20 + + + + bw20 + 0 + + + center_freq20 + 0 + + + norm_gain20 + False + + + gain20 + 0 + + + ant21 + + + + bw21 + 0 + + + center_freq21 + 0 + + + norm_gain21 + False + + + gain21 + 0 + + + ant22 + + + + bw22 + 0 + + + center_freq22 + 0 + + + norm_gain22 + False + + + gain22 + 0 + + + ant23 + + + + bw23 + 0 + + + center_freq23 + 0 + + + norm_gain23 + False + + + gain23 + 0 + + + ant24 + + + + bw24 + 0 + + + center_freq24 + 0 + + + norm_gain24 + False + + + gain24 + 0 + + + ant25 + + + + bw25 + 0 + + + center_freq25 + 0 + + + norm_gain25 + False + + + gain25 + 0 + + + ant26 + + + + bw26 + 0 + + + center_freq26 + 0 + + + norm_gain26 + False + + + gain26 + 0 + + + ant27 + + + + bw27 + 0 + + + center_freq27 + 0 + + + norm_gain27 + False + + + gain27 + 0 + + + ant28 + + + + bw28 + 0 + + + center_freq28 + 0 + + + norm_gain28 + False + + + gain28 + 0 + + + ant29 + + + + bw29 + 0 + + + center_freq29 + 0 + + + norm_gain29 + False + + + gain29 + 0 + + + ant2 + + + + bw2 + 0 + + + center_freq2 + 0 + + + norm_gain2 + False + + + gain2 + 0 + + + ant30 + + + + bw30 + 0 + + + center_freq30 + 0 + + + norm_gain30 + False + + + gain30 + 0 + + + ant31 + + + + bw31 + 0 + + + center_freq31 + 0 + + + norm_gain31 + False + + + gain31 + 0 + + + ant3 + + + + bw3 + 0 + + + center_freq3 + 0 + + + norm_gain3 + False + + + gain3 + 0 + + + ant4 + + + + bw4 + 0 + + + center_freq4 + 0 + + + norm_gain4 + False + + + gain4 + 0 + + + ant5 + + + + bw5 + 0 + + + center_freq5 + 0 + + + norm_gain5 + False + + + gain5 + 0 + + + ant6 + + + + bw6 + 0 + + + center_freq6 + 0 + + + norm_gain6 + False + + + gain6 + 0 + + + ant7 + + + + bw7 + 0 + + + center_freq7 + 0 + + + norm_gain7 + False + + + gain7 + 0 + + + ant8 + + + + bw8 + 0 + + + center_freq8 + 0 + + + norm_gain8 + False + + + gain8 + 0 + + + ant9 + + + + bw9 + 0 + + + center_freq9 + 0 + + + norm_gain9 + False + + + gain9 + 0 + + + clock_rate + 0.0 + + + comment + + + + affinity + + + + dev_addr + "" + + + dev_args + "" + + + _enabled + True + + + _coordinate + (472, 127) + + + _rotation + 0 + + + id + uhd_usrp_sink_0_0 + + + type + fc32 + + + clock_source0 + + + + sd_spec0 + + + + time_source0 + + + + clock_source1 + + + + sd_spec1 + + + + time_source1 + + + + clock_source2 + + + + sd_spec2 + + + + time_source2 + + + + clock_source3 + + + + sd_spec3 + + + + time_source3 + + + + clock_source4 + + + + sd_spec4 + + + + time_source4 + + + + clock_source5 + + + + sd_spec5 + + + + time_source5 + + + + clock_source6 + + + + sd_spec6 + + + + time_source6 + + + + clock_source7 + + + + sd_spec7 + + + + time_source7 + + + + nchan + 1 + + + num_mboards + 1 + + + samp_rate + samp_rate + + + hide_cmd_port + False + + + stream_args + + + + stream_chans + [] + + + sync + + + + len_tag_name + + + + otw + + + + + uhd_usrp_source + + alias + + + + ant0 + + + + bw0 + 0 + + + center_freq0 + freq + + + dc_offs_enb0 + "" + + + iq_imbal_enb0 + "" + + + norm_gain0 + False + + + gain0 + rxgain + + + ant10 + + + + bw10 + 0 + + + center_freq10 + 0 + + + dc_offs_enb10 + "" + + + iq_imbal_enb10 + "" + + + norm_gain10 + False + + + gain10 + 0 + + + ant11 + + + + bw11 + 0 + + + center_freq11 + 0 + + + dc_offs_enb11 + "" + + + iq_imbal_enb11 + "" + + + norm_gain11 + False + + + gain11 + 0 + + + ant12 + + + + bw12 + 0 + + + center_freq12 + 0 + + + dc_offs_enb12 + "" + + + iq_imbal_enb12 + "" + + + norm_gain12 + False + + + gain12 + 0 + + + ant13 + + + + bw13 + 0 + + + center_freq13 + 0 + + + dc_offs_enb13 + "" + + + iq_imbal_enb13 + "" + + + norm_gain13 + False + + + gain13 + 0 + + + ant14 + + + + bw14 + 0 + + + center_freq14 + 0 + + + dc_offs_enb14 + "" + + + iq_imbal_enb14 + "" + + + norm_gain14 + False + + + gain14 + 0 + + + ant15 + + + + bw15 + 0 + + + center_freq15 + 0 + + + dc_offs_enb15 + "" + + + iq_imbal_enb15 + "" + + + norm_gain15 + False + + + gain15 + 0 + + + ant16 + + + + bw16 + 0 + + + center_freq16 + 0 + + + dc_offs_enb16 + "" + + + iq_imbal_enb16 + "" + + + norm_gain16 + False + + + gain16 + 0 + + + ant17 + + + + bw17 + 0 + + + center_freq17 + 0 + + + dc_offs_enb17 + "" + + + iq_imbal_enb17 + "" + + + norm_gain17 + False + + + gain17 + 0 + + + ant18 + + + + bw18 + 0 + + + center_freq18 + 0 + + + dc_offs_enb18 + "" + + + iq_imbal_enb18 + "" + + + norm_gain18 + False + + + gain18 + 0 + + + ant19 + + + + bw19 + 0 + + + center_freq19 + 0 + + + dc_offs_enb19 + "" + + + iq_imbal_enb19 + "" + + + norm_gain19 + False + + + gain19 + 0 + + + ant1 + + + + bw1 + 0 + + + center_freq1 + 0 + + + dc_offs_enb1 + "" + + + iq_imbal_enb1 + "" + + + norm_gain1 + False + + + gain1 + 0 + + + ant20 + + + + bw20 + 0 + + + center_freq20 + 0 + + + dc_offs_enb20 + "" + + + iq_imbal_enb20 + "" + + + norm_gain20 + False + + + gain20 + 0 + + + ant21 + + + + bw21 + 0 + + + center_freq21 + 0 + + + dc_offs_enb21 + "" + + + iq_imbal_enb21 + "" + + + norm_gain21 + False + + + gain21 + 0 + + + ant22 + + + + bw22 + 0 + + + center_freq22 + 0 + + + dc_offs_enb22 + "" + + + iq_imbal_enb22 + "" + + + norm_gain22 + False + + + gain22 + 0 + + + ant23 + + + + bw23 + 0 + + + center_freq23 + 0 + + + dc_offs_enb23 + "" + + + iq_imbal_enb23 + "" + + + norm_gain23 + False + + + gain23 + 0 + + + ant24 + + + + bw24 + 0 + + + center_freq24 + 0 + + + dc_offs_enb24 + "" + + + iq_imbal_enb24 + "" + + + norm_gain24 + False + + + gain24 + 0 + + + ant25 + + + + bw25 + 0 + + + center_freq25 + 0 + + + dc_offs_enb25 + "" + + + iq_imbal_enb25 + "" + + + norm_gain25 + False + + + gain25 + 0 + + + ant26 + + + + bw26 + 0 + + + center_freq26 + 0 + + + dc_offs_enb26 + "" + + + iq_imbal_enb26 + "" + + + norm_gain26 + False + + + gain26 + 0 + + + ant27 + + + + bw27 + 0 + + + center_freq27 + 0 + + + dc_offs_enb27 + "" + + + iq_imbal_enb27 + "" + + + norm_gain27 + False + + + gain27 + 0 + + + ant28 + + + + bw28 + 0 + + + center_freq28 + 0 + + + dc_offs_enb28 + "" + + + iq_imbal_enb28 + "" + + + norm_gain28 + False + + + gain28 + 0 + + + ant29 + + + + bw29 + 0 + + + center_freq29 + 0 + + + dc_offs_enb29 + "" + + + iq_imbal_enb29 + "" + + + norm_gain29 + False + + + gain29 + 0 + + + ant2 + + + + bw2 + 0 + + + center_freq2 + 0 + + + dc_offs_enb2 + "" + + + iq_imbal_enb2 + "" + + + norm_gain2 + False + + + gain2 + 0 + + + ant30 + + + + bw30 + 0 + + + center_freq30 + 0 + + + dc_offs_enb30 + "" + + + iq_imbal_enb30 + "" + + + norm_gain30 + False + + + gain30 + 0 + + + ant31 + + + + bw31 + 0 + + + center_freq31 + 0 + + + dc_offs_enb31 + "" + + + iq_imbal_enb31 + "" + + + norm_gain31 + False + + + gain31 + 0 + + + ant3 + + + + bw3 + 0 + + + center_freq3 + 0 + + + dc_offs_enb3 + "" + + + iq_imbal_enb3 + "" + + + norm_gain3 + False + + + gain3 + 0 + + + ant4 + + + + bw4 + 0 + + + center_freq4 + 0 + + + dc_offs_enb4 + "" + + + iq_imbal_enb4 + "" + + + norm_gain4 + False + + + gain4 + 0 + + + ant5 + + + + bw5 + 0 + + + center_freq5 + 0 + + + dc_offs_enb5 + "" + + + iq_imbal_enb5 + "" + + + norm_gain5 + False + + + gain5 + 0 + + + ant6 + + + + bw6 + 0 + + + center_freq6 + 0 + + + dc_offs_enb6 + "" + + + iq_imbal_enb6 + "" + + + norm_gain6 + False + + + gain6 + 0 + + + ant7 + + + + bw7 + 0 + + + center_freq7 + 0 + + + dc_offs_enb7 + "" + + + iq_imbal_enb7 + "" + + + norm_gain7 + False + + + gain7 + 0 + + + ant8 + + + + bw8 + 0 + + + center_freq8 + 0 + + + dc_offs_enb8 + "" + + + iq_imbal_enb8 + "" + + + norm_gain8 + False + + + gain8 + 0 + + + ant9 + + + + bw9 + 0 + + + center_freq9 + 0 + + + dc_offs_enb9 + "" + + + iq_imbal_enb9 + "" + + + norm_gain9 + False + + + gain9 + 0 + + + clock_rate + 0.0 + + + comment + + + + affinity + + + + dev_addr + "" + + + dev_args + "" + + + _enabled + 1 + + + _coordinate + (472, 230) + + + _rotation + 0 + + + id + uhd_usrp_source_0 + + + maxoutbuf + 0 + + + clock_source0 + + + + sd_spec0 + + + + time_source0 + + + + clock_source1 + + + + sd_spec1 + + + + time_source1 + + + + clock_source2 + + + + sd_spec2 + + + + time_source2 + + + + clock_source3 + + + + sd_spec3 + + + + time_source3 + + + + clock_source4 + + + + sd_spec4 + + + + time_source4 + + + + clock_source5 + + + + sd_spec5 + + + + time_source5 + + + + clock_source6 + + + + sd_spec6 + + + + time_source6 + + + + clock_source7 + + + + sd_spec7 + + + + time_source7 + + + + minoutbuf + 0 + + + nchan + 1 + + + num_mboards + 1 + + + type + fc32 + + + samp_rate + samp_rate + + + hide_cmd_port + False + + + stream_args + + + + stream_chans + [] + + + sync + + + + otw + + + + + analog_sig_source_x_0 + blocks_add_xx_0 + 0 + 1 + + + analog_sig_source_x_1 + blocks_add_xx_0 + 0 + 0 + + + blocks_add_xx_0 + blocks_multiply_const_vxx_0_0 + 0 + 0 + + + blocks_delay_0 + blocks_file_sink_0_0 + 0 + 0 + + + blocks_delay_0 + dpd_memless_poly_0 + 0 + 0 + + + blocks_delay_0_0 + blocks_multiply_const_vxx_0 + 0 + 0 + + + blocks_file_source_0 + blocks_multiply_const_vxx_1 + 0 + 0 + + + blocks_multiply_const_vxx_0 + blocks_null_sink_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + file_sink_out + 0 + 0 + + + blocks_multiply_const_vxx_0 + logpwrfft_x_0_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + mer_all_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + qtgui_freq_sink_x_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + qtgui_time_sink_x_0 + 0 + 0 + + + blocks_multiply_const_vxx_1 + blocks_delay_0 + 0 + 0 + + + dpd_memless_poly_0 + uhd_usrp_sink_0_0 + 0 + 0 + + + logpwrfft_x_0_0 + blks2_tcp_sink_0_0 + 0 + 0 + + + mer_all_0 + blks2_tcp_sink_0_0_0 + 0 + 0 + + + uhd_usrp_source_0 + blocks_delay_0_0 + 0 + 0 + + diff --git a/grc/parallel_measurement_two_tone.grc b/grc/parallel_measurement_two_tone.grc new file mode 100644 index 0000000..8496595 --- /dev/null +++ b/grc/parallel_measurement_two_tone.grc @@ -0,0 +1,3614 @@ + + + + Tue Jan 17 15:09:43 2017 + + options + + author + + + + window_size + + + + category + Custom + + + comment + + + + description + + + + _enabled + True + + + _coordinate + (8, 8) + + + _rotation + 0 + + + generate_options + qt_gui + + + hier_block_src_path + .: + + + id + parallel_measurement + + + max_nouts + 0 + + + qt_qss_theme + + + + realtime_scheduling + + + + run_command + {python} -u {filename} + + + run_options + prompt + + + run + True + + + thread_safe_setters + + + + title + + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 229) + + + _rotation + 0 + + + id + freq + + + value + 222e6 + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 293) + + + _rotation + 0 + + + id + rxgain + + + value + 10 + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 160) + + + _rotation + 0 + + + id + samp_rate + + + value + 8000000 + + + + variable + + comment + + + + _enabled + True + + + _coordinate + (8, 357) + + + _rotation + 0 + + + id + txgain + + + value + 60 + + + + analog_sig_source_x + + amp + 0.45 + + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + freq + 2100000 + + + _coordinate + (48, 552) + + + _rotation + 0 + + + id + analog_sig_source_x_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + offset + 0 + + + type + complex + + + samp_rate + samp_rate + + + waveform + analog.GR_COS_WAVE + + + + analog_sig_source_x + + amp + 0.45 + + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + freq + 2000000 + + + _coordinate + (48, 448) + + + _rotation + 0 + + + id + analog_sig_source_x_1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + offset + 0 + + + type + complex + + + samp_rate + samp_rate + + + waveform + analog.GR_COS_WAVE + + + + blks2_tcp_sink + + addr + 127.0.0.1 + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + _coordinate + (1072, 15) + + + _rotation + 0 + + + id + blks2_tcp_sink_0_0 + + + type + float + + + server + True + + + port + 47009 + + + vlen + 16384 + + + + blocks_add_xx + + alias + + + + comment + + + + affinity + + + + _enabled + 1 + + + _coordinate + (216, 521) + + + _rotation + 0 + + + id + blocks_add_xx_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_inputs + 2 + + + vlen + 1 + + + + blocks_delay + + alias + + + + comment + + + + affinity + + + + delay + 200000 + + + _enabled + True + + + _coordinate + (336, 228) + + + _rotation + 0 + + + id + blocks_delay_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_ports + 1 + + + type + complex + + + vlen + 1 + + + + blocks_delay + + alias + + + + comment + + + + affinity + + + + delay + 210000 + + + _enabled + True + + + _coordinate + (688, 124) + + + _rotation + 0 + + + id + blocks_delay_0_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + num_ports + 1 + + + type + complex + + + vlen + 1 + + + + blocks_file_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + file + /home/andreas/dab/ODR-StaticPrecorrection/output_orig.dat + + + _coordinate + (808, 438) + + + _rotation + 0 + + + id + blocks_file_sink_0_0 + + + type + complex + + + unbuffered + False + + + vlen + 1 + + + + blocks_file_source + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + file + /home/andreas/dab/dab_5s_8000000_max_1.iq + + + _coordinate + (136, 133) + + + _rotation + 0 + + + id + blocks_file_source_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + type + complex + + + repeat + True + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + 1 + + + affinity + + + + _enabled + 1 + + + _coordinate + (672, 236) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_multiply_const_vxx + + alias + + + + comment + + + + const + 1 + + + affinity + + + + _enabled + 1 + + + _coordinate + (280, 532) + + + _rotation + 0 + + + id + blocks_multiply_const_vxx_0_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + vlen + 1 + + + + blocks_null_sink + + alias + + + + bus_conns + [[0,],] + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (880, 209) + + + _rotation + 0 + + + id + blocks_null_sink_0 + + + type + complex + + + num_inputs + 1 + + + vlen + 1 + + + + dpd_memless_poly + + alias + + + + comment + + + + affinity + + + + _enabled + True + + + _coordinate + (432, 307) + + + _rotation + 0 + + + id + dpd_memless_poly_0 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + a1 + 1 + + + a2 + 0 + + + a3 + 0 + + + a4 + 0 + + + a5 + 0 + + + a6 + 0 + + + a7 + 0 + + + a8 + 0 + + + + blocks_file_sink + + append + False + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + file + /home/andreas/dab/ODR-StaticPrecorrection/output.dat + + + _coordinate + (880, 126) + + + _rotation + 0 + + + id + file_sink_out + + + type + complex + + + unbuffered + False + + + vlen + 1 + + + + logpwrfft_x + + avg_alpha + 1.0 + + + average + False + + + alias + + + + comment + + + + affinity + + + + _enabled + 0 + + + fft_size + 16384 + + + frame_rate + 20 + + + _coordinate + (880, 1) + + + _rotation + 0 + + + id + logpwrfft_x_0_0 + + + type + complex + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + ref_scale + 2 + + + sample_rate + samp_rate + + + + qtgui_freq_sink_x + + autoscale + False + + + average + 1.0 + + + bw + samp_rate + + + alias + + + + fc + 0 + + + comment + + + + ctrlpanel + False + + + affinity + + + + _enabled + 1 + + + fftsize + 16383 + + + _coordinate + (1016, 238) + + + gui_hint + + + + _rotation + 0 + + + grid + False + + + id + qtgui_freq_sink_x_0 + + + legend + True + + + alpha1 + 1.0 + + + color1 + "blue" + + + label1 + + + + width1 + 1 + + + alpha10 + 1.0 + + + color10 + "dark blue" + + + label10 + + + + width10 + 1 + + + alpha2 + 1.0 + + + color2 + "red" + + + label2 + + + + width2 + 1 + + + alpha3 + 1.0 + + + color3 + "green" + + + label3 + + + + width3 + 1 + + + alpha4 + 1.0 + + + color4 + "black" + + + label4 + + + + width4 + 1 + + + alpha5 + 1.0 + + + color5 + "cyan" + + + label5 + + + + width5 + 1 + + + alpha6 + 1.0 + + + color6 + "magenta" + + + label6 + + + + width6 + 1 + + + alpha7 + 1.0 + + + color7 + "yellow" + + + label7 + + + + width7 + 1 + + + alpha8 + 1.0 + + + color8 + "dark red" + + + label8 + + + + width8 + 1 + + + alpha9 + 1.0 + + + color9 + "dark green" + + + label9 + + + + width9 + 1 + + + maxoutbuf + 0 + + + minoutbuf + 0 + + + name + "" + + + nconnections + 1 + + + showports + True + + + freqhalf + True + + + tr_chan + 0 + + + tr_level + 0.0 + + + tr_mode + qtgui.TRIG_MODE_FREE + + + tr_tag + "" + + + type + complex + + + update_time + 0.10 + + + wintype + firdes.WIN_BLACKMAN_hARRIS + + + ymax + 10 + + + ymin + -140 + + + + qtgui_time_sink_x + + autoscale + False + + + alias + + + + comment + + + + ctrlpanel + False + + + affinity + + + + entags + True + + + _enabled + 0 + + + _coordinate + (808, 286) + + + gui_hint + + + + _rotation + 0 + + + grid + False + + + id + qtgui_time_sink_x_0 + + + legend + True + + + alpha1 + 1.0 + + + color1 + "blue" + + + label1 + + + + marker1 + -1 + + + style1 + 1 + + + width1 + 1 + + + alpha10 + 1.0 + + + color10 + "blue" + + + label10 + + + + marker10 + -1 + + + style10 + 1 + + + width10 + 1 + + + alpha2 + 1.0 + + + color2 + "red" + + + label2 + + + + marker2 + -1 + + + style2 + 1 + + + width2 + 1 + + + alpha3 + 1.0 + + + color3 + "green" + + + label3 + + + + marker3 + -1 + + + style3 + 1 + + + width3 + 1 + + + alpha4 + 1.0 + + + color4 + "black" + + + label4 + + + + marker4 + -1 + + + style4 + 1 + + + width4 + 1 + + + alpha5 + 1.0 + + + color5 + "cyan" + + + label5 + + + + marker5 + -1 + + + style5 + 1 + + + width5 + 1 + + + alpha6 + 1.0 + + + color6 + "magenta" + + + label6 + + + + marker6 + -1 + + + style6 + 1 + + + width6 + 1 + + + alpha7 + 1.0 + + + color7 + "yellow" + + + label7 + + + + marker7 + -1 + + + style7 + 1 + + + width7 + 1 + + + alpha8 + 1.0 + + + color8 + "dark red" + + + label8 + + + + marker8 + -1 + + + style8 + 1 + + + width8 + 1 + + + alpha9 + 1.0 + + + color9 + "dark green" + + + label9 + + + + marker9 + -1 + + + style9 + 1 + + + width9 + 1 + + + name + "" + + + nconnections + 1 + + + size + 1024*64 + + + srate + samp_rate + + + tr_chan + 0 + + + tr_delay + 0 + + + tr_level + 0.0 + + + tr_mode + qtgui.TRIG_MODE_FREE + + + tr_slope + qtgui.TRIG_SLOPE_POS + + + tr_tag + "" + + + type + complex + + + update_time + 0.10 + + + ylabel + Amplitude + + + yunit + "" + + + ymax + 1 + + + ymin + -1 + + + + uhd_usrp_sink + + alias + + + + ant0 + + + + bw0 + 0 + + + center_freq0 + freq + + + norm_gain0 + False + + + gain0 + txgain + + + ant10 + + + + bw10 + 0 + + + center_freq10 + 0 + + + norm_gain10 + False + + + gain10 + 0 + + + ant11 + + + + bw11 + 0 + + + center_freq11 + 0 + + + norm_gain11 + False + + + gain11 + 0 + + + ant12 + + + + bw12 + 0 + + + center_freq12 + 0 + + + norm_gain12 + False + + + gain12 + 0 + + + ant13 + + + + bw13 + 0 + + + center_freq13 + 0 + + + norm_gain13 + False + + + gain13 + 0 + + + ant14 + + + + bw14 + 0 + + + center_freq14 + 0 + + + norm_gain14 + False + + + gain14 + 0 + + + ant15 + + + + bw15 + 0 + + + center_freq15 + 0 + + + norm_gain15 + False + + + gain15 + 0 + + + ant16 + + + + bw16 + 0 + + + center_freq16 + 0 + + + norm_gain16 + False + + + gain16 + 0 + + + ant17 + + + + bw17 + 0 + + + center_freq17 + 0 + + + norm_gain17 + False + + + gain17 + 0 + + + ant18 + + + + bw18 + 0 + + + center_freq18 + 0 + + + norm_gain18 + False + + + gain18 + 0 + + + ant19 + + + + bw19 + 0 + + + center_freq19 + 0 + + + norm_gain19 + False + + + gain19 + 0 + + + ant1 + + + + bw1 + 0 + + + center_freq1 + 0 + + + norm_gain1 + False + + + gain1 + 0 + + + ant20 + + + + bw20 + 0 + + + center_freq20 + 0 + + + norm_gain20 + False + + + gain20 + 0 + + + ant21 + + + + bw21 + 0 + + + center_freq21 + 0 + + + norm_gain21 + False + + + gain21 + 0 + + + ant22 + + + + bw22 + 0 + + + center_freq22 + 0 + + + norm_gain22 + False + + + gain22 + 0 + + + ant23 + + + + bw23 + 0 + + + center_freq23 + 0 + + + norm_gain23 + False + + + gain23 + 0 + + + ant24 + + + + bw24 + 0 + + + center_freq24 + 0 + + + norm_gain24 + False + + + gain24 + 0 + + + ant25 + + + + bw25 + 0 + + + center_freq25 + 0 + + + norm_gain25 + False + + + gain25 + 0 + + + ant26 + + + + bw26 + 0 + + + center_freq26 + 0 + + + norm_gain26 + False + + + gain26 + 0 + + + ant27 + + + + bw27 + 0 + + + center_freq27 + 0 + + + norm_gain27 + False + + + gain27 + 0 + + + ant28 + + + + bw28 + 0 + + + center_freq28 + 0 + + + norm_gain28 + False + + + gain28 + 0 + + + ant29 + + + + bw29 + 0 + + + center_freq29 + 0 + + + norm_gain29 + False + + + gain29 + 0 + + + ant2 + + + + bw2 + 0 + + + center_freq2 + 0 + + + norm_gain2 + False + + + gain2 + 0 + + + ant30 + + + + bw30 + 0 + + + center_freq30 + 0 + + + norm_gain30 + False + + + gain30 + 0 + + + ant31 + + + + bw31 + 0 + + + center_freq31 + 0 + + + norm_gain31 + False + + + gain31 + 0 + + + ant3 + + + + bw3 + 0 + + + center_freq3 + 0 + + + norm_gain3 + False + + + gain3 + 0 + + + ant4 + + + + bw4 + 0 + + + center_freq4 + 0 + + + norm_gain4 + False + + + gain4 + 0 + + + ant5 + + + + bw5 + 0 + + + center_freq5 + 0 + + + norm_gain5 + False + + + gain5 + 0 + + + ant6 + + + + bw6 + 0 + + + center_freq6 + 0 + + + norm_gain6 + False + + + gain6 + 0 + + + ant7 + + + + bw7 + 0 + + + center_freq7 + 0 + + + norm_gain7 + False + + + gain7 + 0 + + + ant8 + + + + bw8 + 0 + + + center_freq8 + 0 + + + norm_gain8 + False + + + gain8 + 0 + + + ant9 + + + + bw9 + 0 + + + center_freq9 + 0 + + + norm_gain9 + False + + + gain9 + 0 + + + clock_rate + 0.0 + + + comment + + + + affinity + + + + dev_addr + "" + + + dev_args + "" + + + _enabled + True + + + _coordinate + (472, 7) + + + _rotation + 0 + + + id + uhd_usrp_sink_0_0 + + + type + fc32 + + + clock_source0 + + + + sd_spec0 + + + + time_source0 + + + + clock_source1 + + + + sd_spec1 + + + + time_source1 + + + + clock_source2 + + + + sd_spec2 + + + + time_source2 + + + + clock_source3 + + + + sd_spec3 + + + + time_source3 + + + + clock_source4 + + + + sd_spec4 + + + + time_source4 + + + + clock_source5 + + + + sd_spec5 + + + + time_source5 + + + + clock_source6 + + + + sd_spec6 + + + + time_source6 + + + + clock_source7 + + + + sd_spec7 + + + + time_source7 + + + + nchan + 1 + + + num_mboards + 1 + + + samp_rate + samp_rate + + + hide_cmd_port + False + + + stream_args + + + + stream_chans + [] + + + sync + + + + len_tag_name + + + + otw + + + + + uhd_usrp_source + + alias + + + + ant0 + + + + bw0 + 0 + + + center_freq0 + freq + + + dc_offs_enb0 + "" + + + iq_imbal_enb0 + "" + + + norm_gain0 + False + + + gain0 + rxgain + + + ant10 + + + + bw10 + 0 + + + center_freq10 + 0 + + + dc_offs_enb10 + "" + + + iq_imbal_enb10 + "" + + + norm_gain10 + False + + + gain10 + 0 + + + ant11 + + + + bw11 + 0 + + + center_freq11 + 0 + + + dc_offs_enb11 + "" + + + iq_imbal_enb11 + "" + + + norm_gain11 + False + + + gain11 + 0 + + + ant12 + + + + bw12 + 0 + + + center_freq12 + 0 + + + dc_offs_enb12 + "" + + + iq_imbal_enb12 + "" + + + norm_gain12 + False + + + gain12 + 0 + + + ant13 + + + + bw13 + 0 + + + center_freq13 + 0 + + + dc_offs_enb13 + "" + + + iq_imbal_enb13 + "" + + + norm_gain13 + False + + + gain13 + 0 + + + ant14 + + + + bw14 + 0 + + + center_freq14 + 0 + + + dc_offs_enb14 + "" + + + iq_imbal_enb14 + "" + + + norm_gain14 + False + + + gain14 + 0 + + + ant15 + + + + bw15 + 0 + + + center_freq15 + 0 + + + dc_offs_enb15 + "" + + + iq_imbal_enb15 + "" + + + norm_gain15 + False + + + gain15 + 0 + + + ant16 + + + + bw16 + 0 + + + center_freq16 + 0 + + + dc_offs_enb16 + "" + + + iq_imbal_enb16 + "" + + + norm_gain16 + False + + + gain16 + 0 + + + ant17 + + + + bw17 + 0 + + + center_freq17 + 0 + + + dc_offs_enb17 + "" + + + iq_imbal_enb17 + "" + + + norm_gain17 + False + + + gain17 + 0 + + + ant18 + + + + bw18 + 0 + + + center_freq18 + 0 + + + dc_offs_enb18 + "" + + + iq_imbal_enb18 + "" + + + norm_gain18 + False + + + gain18 + 0 + + + ant19 + + + + bw19 + 0 + + + center_freq19 + 0 + + + dc_offs_enb19 + "" + + + iq_imbal_enb19 + "" + + + norm_gain19 + False + + + gain19 + 0 + + + ant1 + + + + bw1 + 0 + + + center_freq1 + 0 + + + dc_offs_enb1 + "" + + + iq_imbal_enb1 + "" + + + norm_gain1 + False + + + gain1 + 0 + + + ant20 + + + + bw20 + 0 + + + center_freq20 + 0 + + + dc_offs_enb20 + "" + + + iq_imbal_enb20 + "" + + + norm_gain20 + False + + + gain20 + 0 + + + ant21 + + + + bw21 + 0 + + + center_freq21 + 0 + + + dc_offs_enb21 + "" + + + iq_imbal_enb21 + "" + + + norm_gain21 + False + + + gain21 + 0 + + + ant22 + + + + bw22 + 0 + + + center_freq22 + 0 + + + dc_offs_enb22 + "" + + + iq_imbal_enb22 + "" + + + norm_gain22 + False + + + gain22 + 0 + + + ant23 + + + + bw23 + 0 + + + center_freq23 + 0 + + + dc_offs_enb23 + "" + + + iq_imbal_enb23 + "" + + + norm_gain23 + False + + + gain23 + 0 + + + ant24 + + + + bw24 + 0 + + + center_freq24 + 0 + + + dc_offs_enb24 + "" + + + iq_imbal_enb24 + "" + + + norm_gain24 + False + + + gain24 + 0 + + + ant25 + + + + bw25 + 0 + + + center_freq25 + 0 + + + dc_offs_enb25 + "" + + + iq_imbal_enb25 + "" + + + norm_gain25 + False + + + gain25 + 0 + + + ant26 + + + + bw26 + 0 + + + center_freq26 + 0 + + + dc_offs_enb26 + "" + + + iq_imbal_enb26 + "" + + + norm_gain26 + False + + + gain26 + 0 + + + ant27 + + + + bw27 + 0 + + + center_freq27 + 0 + + + dc_offs_enb27 + "" + + + iq_imbal_enb27 + "" + + + norm_gain27 + False + + + gain27 + 0 + + + ant28 + + + + bw28 + 0 + + + center_freq28 + 0 + + + dc_offs_enb28 + "" + + + iq_imbal_enb28 + "" + + + norm_gain28 + False + + + gain28 + 0 + + + ant29 + + + + bw29 + 0 + + + center_freq29 + 0 + + + dc_offs_enb29 + "" + + + iq_imbal_enb29 + "" + + + norm_gain29 + False + + + gain29 + 0 + + + ant2 + + + + bw2 + 0 + + + center_freq2 + 0 + + + dc_offs_enb2 + "" + + + iq_imbal_enb2 + "" + + + norm_gain2 + False + + + gain2 + 0 + + + ant30 + + + + bw30 + 0 + + + center_freq30 + 0 + + + dc_offs_enb30 + "" + + + iq_imbal_enb30 + "" + + + norm_gain30 + False + + + gain30 + 0 + + + ant31 + + + + bw31 + 0 + + + center_freq31 + 0 + + + dc_offs_enb31 + "" + + + iq_imbal_enb31 + "" + + + norm_gain31 + False + + + gain31 + 0 + + + ant3 + + + + bw3 + 0 + + + center_freq3 + 0 + + + dc_offs_enb3 + "" + + + iq_imbal_enb3 + "" + + + norm_gain3 + False + + + gain3 + 0 + + + ant4 + + + + bw4 + 0 + + + center_freq4 + 0 + + + dc_offs_enb4 + "" + + + iq_imbal_enb4 + "" + + + norm_gain4 + False + + + gain4 + 0 + + + ant5 + + + + bw5 + 0 + + + center_freq5 + 0 + + + dc_offs_enb5 + "" + + + iq_imbal_enb5 + "" + + + norm_gain5 + False + + + gain5 + 0 + + + ant6 + + + + bw6 + 0 + + + center_freq6 + 0 + + + dc_offs_enb6 + "" + + + iq_imbal_enb6 + "" + + + norm_gain6 + False + + + gain6 + 0 + + + ant7 + + + + bw7 + 0 + + + center_freq7 + 0 + + + dc_offs_enb7 + "" + + + iq_imbal_enb7 + "" + + + norm_gain7 + False + + + gain7 + 0 + + + ant8 + + + + bw8 + 0 + + + center_freq8 + 0 + + + dc_offs_enb8 + "" + + + iq_imbal_enb8 + "" + + + norm_gain8 + False + + + gain8 + 0 + + + ant9 + + + + bw9 + 0 + + + center_freq9 + 0 + + + dc_offs_enb9 + "" + + + iq_imbal_enb9 + "" + + + norm_gain9 + False + + + gain9 + 0 + + + clock_rate + 0.0 + + + comment + + + + affinity + + + + dev_addr + "" + + + dev_args + "" + + + _enabled + 1 + + + _coordinate + (472, 110) + + + _rotation + 0 + + + id + uhd_usrp_source_0 + + + maxoutbuf + 0 + + + clock_source0 + + + + sd_spec0 + + + + time_source0 + + + + clock_source1 + + + + sd_spec1 + + + + time_source1 + + + + clock_source2 + + + + sd_spec2 + + + + time_source2 + + + + clock_source3 + + + + sd_spec3 + + + + time_source3 + + + + clock_source4 + + + + sd_spec4 + + + + time_source4 + + + + clock_source5 + + + + sd_spec5 + + + + time_source5 + + + + clock_source6 + + + + sd_spec6 + + + + time_source6 + + + + clock_source7 + + + + sd_spec7 + + + + time_source7 + + + + minoutbuf + 0 + + + nchan + 1 + + + num_mboards + 1 + + + type + fc32 + + + samp_rate + samp_rate + + + hide_cmd_port + False + + + stream_args + + + + stream_chans + [] + + + sync + + + + otw + + + + + analog_sig_source_x_0 + blocks_add_xx_0 + 0 + 1 + + + analog_sig_source_x_1 + blocks_add_xx_0 + 0 + 0 + + + blocks_add_xx_0 + blocks_multiply_const_vxx_0_0 + 0 + 0 + + + blocks_delay_0 + blocks_file_sink_0_0 + 0 + 0 + + + blocks_delay_0 + dpd_memless_poly_0 + 0 + 0 + + + blocks_delay_0_0 + blocks_multiply_const_vxx_0 + 0 + 0 + + + blocks_file_source_0 + blocks_delay_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + blocks_null_sink_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + file_sink_out + 0 + 0 + + + blocks_multiply_const_vxx_0 + logpwrfft_x_0_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + qtgui_freq_sink_x_0 + 0 + 0 + + + blocks_multiply_const_vxx_0 + qtgui_time_sink_x_0 + 0 + 0 + + + blocks_multiply_const_vxx_0_0 + blocks_delay_0 + 0 + 0 + + + dpd_memless_poly_0 + uhd_usrp_sink_0_0 + 0 + 0 + + + logpwrfft_x_0_0 + blks2_tcp_sink_0_0 + 0 + 0 + + + uhd_usrp_source_0 + blocks_delay_0_0 + 0 + 0 + + diff --git a/receive_tcp.ipynb b/receive_tcp.ipynb index 8c2cb79..5352b50 100644 --- a/receive_tcp.ipynb +++ b/receive_tcp.ipynb @@ -20,6 +20,8 @@ "import src.signal_gen as sg\n", "import src.tcp_sync as ts\n", "import src.dab_tuning_lib as dt\n", + "import pandas as pd\n", + "from tqdm import tqdm\n", "reload(sg)\n", "reload(du)\n", "reload(dt)" @@ -34,7 +36,20 @@ }, "outputs": [], "source": [ - "import src.SendDictTcp as sdt" + "use_fft=False" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "if use_fft: t1 = ts.UhdSyncMsg(port=47009, packet_size=4*16384, packet_type=\"f\"*16384)\n", + "else: t1 = ts.UhdSyncMsg(port=47009, packet_size=4*1, packet_type=\"f\")" ] }, { @@ -46,7 +61,7 @@ }, "outputs": [], "source": [ - "t1 = ts.UhdSyncMsg(port=47009, packet_size=4*16384, packet_type=\"f\"*16384)" + "import src.SendDictTcp as sdt" ] }, { @@ -69,7 +84,35 @@ "editable": true }, "outputs": [], - "source": [] + "source": [ + "sender.send({\"txgain\":80})\n", + "sender.send({\"rxgain\":15})\n", + "sender.send({\"a1\":0.8})\n", + "sender.send({\"a2\":0.0})\n", + "sender.send({\"a3\":0.0})\n", + "sender.send({\"a4\":0.0})\n", + "sender.send({\"a5\":0.0})\n", + "sender.send({\"a6\":0.0})\n", + "sender.send({\"a7\":0.0})\n", + "sender.send({\"a8\":0.0})" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "t1.has_msg()\n", + "t = time.time()\n", + "t1.get_msgs(10000)\n", + "print( time.time() - t)\n", + "t = time.time()\n", + "t1.get_msgs(10000)" + ] }, { "cell_type": "code", @@ -80,7 +123,19 @@ }, "outputs": [], "source": [ - "sender.send({\"txgain\":60})" + "reload(dt)\n", + "sender.send({\"txgain\":81})\n", + "sender.send({\"rxgain\":15})\n", + "sender.send({\"a1\":0.8})\n", + "sender.send({\"a2\":0.0})\n", + "sender.send({\"a3\":0.0})\n", + "sender.send({\"a4\":0.0})\n", + "sender.send({\"a5\":0.0})\n", + "sender.send({\"a6\":0.0})\n", + "sender.send({\"a7\":0.0})\n", + "sender.send({\"a8\":0.0})\n", + "t1.has_msg()\n", + "np.mean(t1.get_msgs(10000))" ] }, { @@ -92,7 +147,7 @@ }, "outputs": [], "source": [ - "sender.send({\"a1\":1})" + "reload(dt)" ] }, { @@ -103,6 +158,50 @@ "editable": true }, "outputs": [], + "source": [ + "def measure_sholders(verbose = False, raw_data=False, std_max=0.025):\n", + " for i in range(20):\n", + " try:\n", + " if verbose: print(\"%d measurement\" % i)\n", + " t1.has_msg()\n", + " msgs = t1.get_msgs_fft(20000)\n", + " #sholders = [dt.calc_signal_sholder_ratio(np.array(msg), 8000000) for msg in msgs]\n", + " #sholders = [dt.calc_max_in_freq_range(np.array(msg), 8000000, 1000000, 1900000, debug=False) for msg in msgs]\n", + " #sholders = [dt.calc_mean_in_freq_range(np.array(msg), 8000000, 1000000, 1900000, debug=False) for msg in msgs]\n", + " sholders = np.array(msgs)\n", + " std = np.std(sholders)\n", + " mean = np.mean(sholders)\n", + " std_perc = std/np.abs(mean)\n", + " if verbose == 2:\n", + " print( {\"mean\":mean, \"std\":std, \"std_perc\":std_perc})\n", + " if std_perc > std_max:\n", + " if verbose: print(\"%.4f std/mean\" % (std_perc))\n", + " continue\n", + " else:\n", + " if raw_data: return sholders\n", + " else: return np.mean(sholders)\n", + " except Exception as e:\n", + " print e\n", + " raise Exception(\"Variance of measurement to high\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "a = np.array(measure_sholders(verbose=2, std_max=100, raw_data=True)).flatten()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [] }, { @@ -114,18 +213,8 @@ }, "outputs": [], "source": [ - "def measure_sholders():\n", - " for i in range(10):\n", - " t1.has_msg()\n", - " msgs = t1.get_msgs(20)\n", - " sholders = [dt.calc_signal_sholder_ratio(np.array(msg), 8000000) for msg in msgs]\n", - " std = np.std(sholders)\n", - " mean = np.mean(sholders)\n", - " if std/mean < 0.05:\n", - " continue\n", - " else:\n", - " return np.mean(sholders)\n", - " raise Exception(\"Variance of measurement to high\")" + "b = a[a<0.04]\n", + "plt.hist(b, bins=100);" ] }, { @@ -137,7 +226,33 @@ }, "outputs": [], "source": [ - "measure_sholders()" + "from tqdm import tqdm_notebook\n", + "\n", + "sender.send({\"txgain\":83})\n", + "sender.send({\"rxgain\":15})\n", + "sender.send({\"a1\":0.8})\n", + "\n", + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.5, 0.5, num=10)):\n", + " for a3 in tqdm_notebook([0]):\n", + " for a4 in tqdm_notebook([0]):\n", + "#for a2 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + "# for a3 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + "# for a4 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(verbose=0, std_max=100, raw_data=True)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a2.csv\")\n", + "print(time.time() - t)" ] }, { @@ -148,7 +263,26 @@ "editable": true }, "outputs": [], - "source": [] + "source": [ + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a3.csv\")\n", + "print(time.time() - t)" + ] }, { "cell_type": "code", @@ -159,7 +293,24 @@ }, "outputs": [], "source": [ - "t1.has_msg()" + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a4.csv\")\n", + "print(time.time() - t)" ] }, { @@ -180,7 +331,69 @@ "editable": true }, "outputs": [], - "source": [] + "source": [ + "from tqdm import tqdm_notebook\n", + "\n", + "sender.send({\"txgain\":81})\n", + "sender.send({\"rxgain\":15})\n", + "sender.send({\"a1\":0.8})\n", + "\n", + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a2_81.csv\")\n", + "print(time.time() - t)\n", + "\n", + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a3_81.csv\")\n", + "print(time.time() - t)\n", + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a4_81.csv\")\n", + "print(time.time() - t)" + ] }, { "cell_type": "code", @@ -190,7 +403,69 @@ "editable": true }, "outputs": [], - "source": [] + "source": [ + "from tqdm import tqdm_notebook\n", + "\n", + "sender.send({\"txgain\":85})\n", + "sender.send({\"rxgain\":15})\n", + "sender.send({\"a1\":0.8})\n", + "\n", + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a2_85.csv\")\n", + "print(time.time() - t)\n", + "\n", + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a3_85.csv\")\n", + "print(time.time() - t)\n", + "res = []\n", + "err = []\n", + "t = time.time()\n", + "for a2 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a3 in tqdm_notebook(np.linspace(-0.2, 0.2, num=5)):\n", + " for a4 in tqdm_notebook(np.linspace(-0.5, 0.5, num=21)):\n", + " try:\n", + " sender.send({\"a2\":a2})\n", + " sender.send({\"a3\":a3})\n", + " sender.send({\"a4\":a4})\n", + " losses = measure_sholders(raw_data=True, std=0.03)\n", + " for i, loss in enumerate(losses):\n", + " res.append({\"a2\":a2, \"a3\":a3, \"a4\":a4, \"loss\":loss, \"run\":i})\n", + " except Exception as e:\n", + " err.append(e)\n", + " df = pd.DataFrame(res)\n", + " df.to_csv(\"/tmp/sholder_a4_85.csv\")\n", + "print(time.time() - t)" + ] }, { "cell_type": "code", @@ -201,8 +476,9 @@ }, "outputs": [], "source": [ - "#top.stop()\n", - "#top.wait()" + "sender.send({\"txgain\":20})\n", + "sender.send({\"rxgain\":15})\n", + "sender.send({\"a1\":0.1})" ] }, { diff --git a/src/ReceiveDictTcp.py b/src/ReceiveDictTcp.py index 3feec31..784afb6 100644 --- a/src/ReceiveDictTcp.py +++ b/src/ReceiveDictTcp.py @@ -5,9 +5,10 @@ from Queue import Queue import sys class ReceiveDictTcp(object): - def __init__(self, host, port): + def __init__(self, host, port, verbose=False): self.host = host self.port = port + self.verbose = verbose self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.sock.bind((self.host, self.port)) @@ -21,17 +22,18 @@ class ReceiveDictTcp(object): self.sock.listen(5) while True: client, address = self.sock.accept() - client.settimeout(0) - print("connecting to " + str(client) + " " + str(address)) + client.setblocking(1) + if self.verbose: print("connecting to " + str(client) + " " + str(address)) self.listenToClient(client,address) def listenToClient(self, client, address): size = 1024 while True: + if self.verbose: print("Try receiving") try: data = client.recv(size) if data: - # Set the response to echo back the recieved data + # Set the response to echo back the recieved data jresponse = data response = json.loads(jresponse) client.send(json.dumps(response)) diff --git a/src/dab_tuning_lib.py b/src/dab_tuning_lib.py index 8faafef..e5348b0 100644 --- a/src/dab_tuning_lib.py +++ b/src/dab_tuning_lib.py @@ -17,7 +17,6 @@ def calc_signal_sholder_ratio(fft, sampling_rate, debug = False, debug_path="", du.freq_to_fft_sample(-du.c["bw"]/2, fft_size, sampling_rate)) sholder = np.mean(fft[n_sholder[0]:n_sholder[1]]) - score = -sholder if debug == True: print(n_sig, n_sholder, n_noise) @@ -25,7 +24,69 @@ def calc_signal_sholder_ratio(fft, sampling_rate, debug = False, debug_path="", plt.plot((n_sig[0], n_sig[1]), (sig, sig), linewidth=5, color='g') plt.plot((n_noise[0], n_noise[1]), (noise, noise), linewidth=5, color='r') plt.plot((n_sholder[0], n_sholder[1]), (sholder, sholder), linewidth=5, color='y') - plt.savefig(debug_path + "/" + str(score) + suffix + ".png") + if debug_path: plt.savefig(debug_path + "/" + str(loss) + suffix + ".png") + plt.show() plt.clf() - return score + return sholder + +def calc_signal_sholder_peak_ratio(fft, sampling_rate, debug = False, debug_path="", suffix=""): + fft_size = fft.shape[0] + n_sig = (du.freq_to_fft_sample(-du.c["bw"]/2., fft_size, sampling_rate), + du.freq_to_fft_sample( du.c["bw"]/2., fft_size, sampling_rate)) + sig = np.mean(fft[n_sig[0]:n_sig[1]]) + + n_noise = (du.freq_to_fft_sample(-3000000., fft_size, sampling_rate), + du.freq_to_fft_sample(-2500000, fft_size, sampling_rate)) + noise = np.mean(fft[n_noise[0]:n_noise[1]]) + + n_sholder = (du.freq_to_fft_sample(-1500000, fft_size, sampling_rate), + du.freq_to_fft_sample(-du.c["bw"]/2, fft_size, sampling_rate)) + sholder = np.mean(fft[n_sholder[0]:n_sholder[1]]) + + loss = sholder/sig + + + if debug == True: + print(n_sig, n_sholder, n_noise) + plt.plot(fft) + plt.plot((n_sig[0], n_sig[1]), (sig, sig), linewidth=5, color='g') + plt.plot((n_noise[0], n_noise[1]), (noise, noise), linewidth=5, color='r') + plt.plot((n_sholder[0], n_sholder[1]), (sholder, sholder), linewidth=5, color='y') + if debug_path: plt.savefig(debug_path + "/" + str(loss) + suffix + ".png") + plt.show() + plt.clf() + + return loss + +def calc_max_in_freq_range(fft, sampling_rate, f_start, f_end, debug = False, debug_path="", suffix=""): + fft_size = fft.shape[0] + n_sig = (du.freq_to_fft_sample(f_start, fft_size, sampling_rate), + du.freq_to_fft_sample(f_end, fft_size, sampling_rate)) + sig = np.max(fft[n_sig[0]:n_sig[1]]) + + if debug == True: + print(n_sig) + plt.plot(fft) + plt.plot((n_sig[0], n_sig[1]), (sig, sig), linewidth=5, color='g') + if debug_path: plt.savefig(debug_path + "/" + str(loss) + suffix + ".png") + plt.show() + plt.clf() + + return sig + +def calc_mean_in_freq_range(fft, sampling_rate, f_start, f_end, debug = False, debug_path="", suffix=""): + fft_size = fft.shape[0] + n_sig = (du.freq_to_fft_sample(f_start, fft_size, sampling_rate), + du.freq_to_fft_sample(f_end, fft_size, sampling_rate)) + sig = np.mean(fft[n_sig[0]:n_sig[1]]) + + if debug == True: + print(n_sig) + plt.plot(fft) + plt.plot((n_sig[0], n_sig[1]), (sig, sig), linewidth=5, color='g') + if debug_path: plt.savefig(debug_path + "/" + str(loss) + suffix + ".png") + plt.show() + plt.clf() + + return sig diff --git a/src/dab_util.py b/src/dab_util.py index 8ab1e03..fbd1cc6 100644 --- a/src/dab_util.py +++ b/src/dab_util.py @@ -3,9 +3,13 @@ import scipy import matplotlib.pyplot as plt import fftconvolve -c = { - "bw":1536000 - } +c = {} +c["bw"]=1536000 +c["frame_ms"]=96 +c["frame_8192000"]=c["frame_ms"] * 8192 +c["frame_2048000"]=c["frame_ms"] * 2048 +c["sym_8192000"]=96./76*8192 +c["sym_2048000"]=96./76*2048 def calc_fft(signal, fft_size = 1024, sampling_rate = 1, plot = False): """returns one numpy array for the frequencies and one for the corresponding fft""" diff --git a/src/tcp_sync.py b/src/tcp_sync.py index 6a2e619..4a5a5b8 100644 --- a/src/tcp_sync.py +++ b/src/tcp_sync.py @@ -5,6 +5,7 @@ import Queue import time import socket import struct +import numpy as np class _TcpSyncClient(threading.Thread): """Thead for message polling""" @@ -54,7 +55,7 @@ class _TcpSyncClient(threading.Thread): if (len(s)) == self.packet_size: break if (len(s)) > self.packet_size: - print("received wrong size of length " + str(len(s))) + print("received wrong size of length " + str(len(s)) + " instead of " + str(self.packet_size)) time.sleep(0.01) return -1 @@ -96,6 +97,16 @@ class UhdSyncMsg(object): out.append(self.tcpa.queue.get()) return out + def get_msgs_fft(self, num): + """ + get received messages as string of integer + apply fftshift to message + """ + out = [] + while len(out) < num: + out.append(self.tcpa.queue.get()) + return [np.fft.fftshift(np.array(o)) for o in out] + def get_res(self): """get received messages as string of integer""" out = [] diff --git a/sync-measurement-while-sending.ipynb b/sync-measurement-while-sending.ipynb index e1f7ba9..616df5b 100644 --- a/sync-measurement-while-sending.ipynb +++ b/sync-measurement-while-sending.ipynb @@ -42,13 +42,9 @@ }, "outputs": [], "source": [ - "path_in = \"./input.dat\"\n", - "path_out = \"./output.dat\"\n", - "a_max = 0.95\n", - "n_steps = 64\n", - "amps = np.linspace(0.001, a_max, num = n_steps)\n", - "txgains = (75,)\n", - "rxgains = (20,)" + "from grc.parallel_measurement import parallel_measurement\n", + "#from grc.parallel_measurement_mer import parallel_measurement_mer\n", + "#from grc.parallel_measurement_two_tone import parallel_measurement_two_tone" ] }, { @@ -60,7 +56,9 @@ }, "outputs": [], "source": [ - "from grc.parallel_measurement import parallel_measurement" + "top = parallel_measurement()\n", + "#top = parallel_measurement_mer()\n", + "#top = parallel_measurement_two_tone()" ] }, { @@ -71,9 +69,7 @@ "editable": true }, "outputs": [], - "source": [ - "sg.gen_ramps(path=\"./input.dat\", n_periods=64, pause=8, amplitudes=amps)" - ] + "source": [] }, { "cell_type": "code", @@ -84,7 +80,7 @@ }, "outputs": [], "source": [ - "top = parallel_measurement()" + "top.start()" ] }, { @@ -95,9 +91,7 @@ "editable": true }, "outputs": [], - "source": [ - "top.start()" - ] + "source": [] }, { "cell_type": "code", @@ -162,7 +156,9 @@ "editable": true }, "outputs": [], - "source": [] + "source": [ + "top.blocks_file_source_0.open(\"/home/andreas/dab/out_cut.iq\", True)" + ] }, { "cell_type": "code", @@ -175,6 +171,7 @@ "source": [ "while True:\n", " d = receiver.queue.get()\n", + " time.sleep(0.01)\n", " \n", " print(d)\n", " k = d.keys()[0]\n", @@ -252,7 +249,45 @@ "editable": true }, "outputs": [], - "source": [] + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "a = np.fromfile(\"../test_dat/dab_5s_8000000.iq\", dtype=np.complex64)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "a = a/np.abs(a).max()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "a.tofile(\"/home/andreas/dab/dab_5s_8000000_max_1.iq\")" + ] }, { "cell_type": "code", diff --git a/two_tone_tuner.ipynb b/two_tone_tuner.ipynb index 1d6f6cb..af7ad74 100644 --- a/two_tone_tuner.ipynb +++ b/two_tone_tuner.ipynb @@ -3,7 +3,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "%matplotlib inline\n", @@ -17,13 +20,16 @@ "import src.tcp_async as tcp_async\n", "import src.tcp_sync as tcp_sync\n", "\n", - "from live_analyse_py import live_analyse_py" + "#from live_analyse_py import live_analyse_py" ] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "try:\n", @@ -40,7 +46,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "sync = tcp_sync.UhdSyncMsg(packet_size=4*8192,\n", @@ -51,7 +60,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "top = live_analyse_py()" @@ -60,7 +72,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "top.start()" @@ -69,7 +84,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "sync.has_msg()\n", @@ -79,7 +97,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "top.set_txgain(85)\n", @@ -89,7 +110,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "tt.gen_two_tone(debug = True)" @@ -98,15 +122,32 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], - "source": [] + "source": [ + "a = np.fromfile(\"./input.dat\")" + ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], + "source": [ + "a.max()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "deletable": true, + "editable": true + }, + "outputs": [], "source": [ "def measure(param, debug = False):\n", " #x2, x3, x4, x5, x6, x7, x8 = param\n", @@ -158,7 +199,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "def simple_opt(pars, i, d, func):\n", @@ -183,7 +227,10 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "#top.blocks_file_source_0.open(\"../dab_normalized_c64.dat\", True)" @@ -192,14 +239,20 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "reload(dt)\n", @@ -216,14 +269,20 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [ "sync.stop()\n", @@ -235,28 +294,40 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "deletable": true, + "editable": true + }, "outputs": [], "source": [] } -- cgit v1.2.3