If values of sediment attenuation parameters are infinite, a warning is added and inversion computatio is not allowed #41
parent
477ad00cf8
commit
b99e950a8e
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue