If values of sediment attenuation parameters are infinite, a warning is added and inversion computatio is not allowed #41

dev-brahim v2.1
brahim 2025-03-17 17:25:55 +01:00
parent 477ad00cf8
commit b99e950a8e
2 changed files with 22 additions and 0 deletions

View File

@ -23,6 +23,7 @@
import os
import numpy as np
import pandas as pd
from math import isinf
from copy import deepcopy
@ -398,6 +399,16 @@ class AcousticInversionTab(QWidget):
msgBox.setStandardButtons(QMessageBox.Ok)
msgBox.exec()
elif isinf(stg.alpha_s[0]) or isinf(stg.alpha_s[1]):
msgBox = QMessageBox()
msgBox.setWindowTitle("Alpha computation error")
msgBox.setIconPixmap(
QPixmap(self.path_icon + "no_approved.png").scaledToHeight(32, Qt.SmoothTransformation))
msgBox.setText("Sediment sound attenuation is infinite !")
msgBox.setStandardButtons(QMessageBox.Ok)
msgBox.exec()
else:
self.compute_VBI()

View File

@ -27,6 +27,7 @@ from scipy.stats import linregress
import numpy as np
import pandas as pd
from math import isinf
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
@ -2246,6 +2247,16 @@ class SedimentCalibrationTab(QWidget):
msgBox.setStandardButtons(QMessageBox.Ok)
msgBox.exec()
elif isinf(alpha_s_freq1) or isinf(alpha_s_freq2):
msgBox = QMessageBox()
msgBox.setWindowTitle("Alpha computation error")
msgBox.setIconPixmap(
QPixmap(self._path_icon("no_approved.png")).scaledToHeight(32, Qt.SmoothTransformation))
msgBox.setText("Sediment sound attenuation is infinite !")
msgBox.setStandardButtons(QMessageBox.Ok)
msgBox.exec()
else:
msgBox = QMessageBox()