mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-30 03:10:40 +01:00
Correction of average filter button (if no acoustic data) #33
This commit is contained in:
1 parent
df68a862fc
commit
06056d4865
1 file changed
+18
@@ -1551,6 +1551,24 @@ class SignalProcessingTab(QWidget):
|
|||||||
|
|
||||||
def compute_averaged_BS_data(self):
|
def compute_averaged_BS_data(self):
|
||||||
|
|
||||||
|
if len(stg.filename_BS_raw_data) == 0:
|
||||||
|
msgBox = QMessageBox()
|
||||||
|
msgBox.setWindowTitle("Compute noise from profile tail error")
|
||||||
|
msgBox.setIcon(QMessageBox.Warning)
|
||||||
|
msgBox.setText("Download acoustic data in previous tab before applying SNR filter")
|
||||||
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
|
msgBox.exec()
|
||||||
|
|
||||||
|
elif len(stg.BS_noise_raw_data) == 0:
|
||||||
|
msgBox = QMessageBox()
|
||||||
|
msgBox.setWindowTitle("SNR filter Error")
|
||||||
|
msgBox.setIcon(QMessageBox.Warning)
|
||||||
|
msgBox.setText("Define noise data (file or profile tail) before using SNR filter")
|
||||||
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
|
msgBox.exec()
|
||||||
|
|
||||||
|
else:
|
||||||
|
|
||||||
kernel_avg = np.ones(2 * int(float(self.lineEdit_horizontal_average.text().replace(",", "."))) + 1)
|
kernel_avg = np.ones(2 * int(float(self.lineEdit_horizontal_average.text().replace(",", "."))) + 1)
|
||||||
print(kernel_avg)
|
print(kernel_avg)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user