def test_run_dsp(): exp_data_carriers = test_data['data_carriers'] exp_super_frame_start = test_data['super_frame_start'] iq_data = iq_data_int[::2] + 1j*iq_data_int[1::2] data_carriers, super_frame_start = components.run_dsp(iq_data) assert np.allclose(data_carriers, exp_data_carriers, atol=1e-5) assert super_frame_start == exp_super_frame_start _plot_dsp_constellations(data_carriers, exp_data_carriers)
def run(self, file_): self._get_iq_data(file_) data_carriers, super_frame_start = components.run_dsp(self.iq_data) demultiplex_bits = components.inner_processing(data_carriers, super_frame_start) vit_decoded = components.viterbi_decoder(demultiplex_bits, self.rate) self.m2ts_byte_string = components.outer_processing(vit_decoded, super_frame_start, self.rate) return self.m2ts_byte_string