Signal processing: Fix 'time_noise' and 'depth_noise' recomputation.

This commit is contained in:
parouby committed 2025-04-24 11:23:21 +02:00
1 parent 84fe5738a3
commit 68d3bd14aa
2 files changed
+16 -27

No files matched your search

+5 -21
View File
@@ -629,33 +629,16 @@ class SignalProcessingTab(QWidget):
if len(stg.BS_noise_raw_data) == 0:
self.load_noise_data_and_compute_SNR()
else:
self.compute_noise()
for i in range(self.combobox_acoustic_data_choice.count()):
self.compute_noise(i)
elif stg.noise_method[data_id] == 1:
self.compute_noise_from_profile_tail_value()
self.remove_point_with_snr_filter()
self.compute_averaged_BS_data()
def compute_noise(self):
data_id = max(0, self.combobox_acoustic_data_choice.currentIndex())
if stg.time_cross_section[data_id].shape != (0,):
stg.time_noise[data_id] = (
stg.time_cross_section[data_id]
)
else:
stg.time_noise[data_id] = (
stg.time[data_id]
)
if stg.depth_cross_section[data_id].shape != (0,):
stg.depth_noise[data_id] = (
stg.depth_cross_section[data_id]
)
else:
stg.depth_noise[data_id] = (
stg.depth[data_id]
)
@trace
def compute_noise(self, data_id):
if self._is_correct_shape(stg.BS_stream_bed):
BS_data = stg.BS_stream_bed
SNR_data = stg.SNR_stream_bed
@@ -1139,6 +1122,7 @@ class SignalProcessingTab(QWidget):
self.compute_noise_from_profile_tail_value_compute()
@trace
def compute_noise_from_profile_tail_value_compute(self):
data_id = max(0, self.combobox_acoustic_data_choice.currentIndex())