Sediment calibration: Minor change.
parent
34690264b1
commit
0dd38af7a9
|
|
@ -1610,7 +1610,7 @@ class SedimentCalibrationTab(QWidget):
|
||||||
path = stg.path_BS_raw_data[-1]
|
path = stg.path_BS_raw_data[-1]
|
||||||
|
|
||||||
file_type = {
|
file_type = {
|
||||||
"Calibration file (*.csv *.ods *.xls *.xlsx)":
|
"Calibration Files (*.csv *.ods *.xls *.xlsx)":
|
||||||
self.read_calibration_dispatch,
|
self.read_calibration_dispatch,
|
||||||
"CSV Files (*.csv)": self.read_calibration_csv,
|
"CSV Files (*.csv)": self.read_calibration_csv,
|
||||||
"Excel Files (*.xlsx *.xls)": self.read_calibration_excel,
|
"Excel Files (*.xlsx *.xls)": self.read_calibration_excel,
|
||||||
|
|
@ -1632,8 +1632,6 @@ class SedimentCalibrationTab(QWidget):
|
||||||
stg.path_calibration_file = dir_name
|
stg.path_calibration_file = dir_name
|
||||||
stg.filename_calibration_file = name
|
stg.filename_calibration_file = name
|
||||||
|
|
||||||
parser = file_type[ftype]
|
|
||||||
|
|
||||||
self.lineEdit_import_calibration.clear()
|
self.lineEdit_import_calibration.clear()
|
||||||
self.lineEdit_import_calibration.setText(name)
|
self.lineEdit_import_calibration.setText(name)
|
||||||
|
|
||||||
|
|
@ -1641,12 +1639,13 @@ class SedimentCalibrationTab(QWidget):
|
||||||
|
|
||||||
self.compute_depth_2D()
|
self.compute_depth_2D()
|
||||||
try:
|
try:
|
||||||
|
parser = file_type[ftype]
|
||||||
data = parser(filename)
|
data = parser(filename)
|
||||||
|
|
||||||
self.fill_calibration_select_frequencies(data)
|
self.fill_calibration_select_frequencies(data)
|
||||||
self.fill_calibration_parameters(data)
|
self.fill_calibration_parameters(data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(f"read_calibration failed: {str(e)}")
|
logger.warning(f"read calibration failed: {str(e)}")
|
||||||
|
|
||||||
def read_calibration_dispatch(self, filename):
|
def read_calibration_dispatch(self, filename):
|
||||||
if ".csv" in filename:
|
if ".csv" in filename:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue