def estimate_qad_center(self) -> float: center = self.__parameter_cache[self.modulation_type_str]["qad_center"] if center is None: noise_value = signal_functions.get_noise_for_mod_type(self.modulation_type) qad = self.qad[np.where(self.qad > noise_value)] if noise_value < 0 else self.qad center = signal_functions.estimate_qad_center(qad, constants.NUM_CENTERS) self.__parameter_cache[self.modulation_type_str]["qad_center"] = center return center
bit_len = self.__parameter_cache[self.modulation_type_str]["bit_len"] if bit_len is None: bit_len = signal_functions.estimate_bit_len(self.qad, self.qad_center, self.tolerance, self.modulation_type) self.__parameter_cache[self.modulation_type_str]["bit_len"] = bit_len return bit_len def estimate_qad_center(self) -> float: center = self.__parameter_cache[self.modulation_type_str]["qad_center"] if center is None: < noise_value = signal_functions.get_noise_for_mod_type(int(self.modulation_type)) >>>>>>>+HEAD ====== noise_value = signal_functions.get_noise_for_mod_type(self.modulation_type) >>>>>>>-b1ae517 qad = self.qad[np.where(self.qad > noise_value)] if noise_value < 0 else self.qad center = signal_functions.estimate_qad_center(qad, constants.NUM_CENTERS) self.__parameter_cache[self.modulation_type_str]["qad_center"] = center return center < def create_new(self, start=0, end=0, new_data=None): new_signal = Signal("", "New " + self.name) if new_data is None: new_signal._fulldata = self.data[start:end] else: new_signal._fulldata = new_data new_signal._noise_threshold = self.noise_threshold new_signal.noise_min_plot = self.noise_min_plot new_signal.noise_max_plot = self.noise_max_plot new_signal.__bit_len = self.bit_len