Sediment calibration: Update calibration in view at study open.

dev
Pierre-Antoine 2025-04-16 09:16:35 +02:00
parent 2c1b01118e
commit 660a09b09a
2 changed files with 37 additions and 7 deletions

View File

@ -697,11 +697,11 @@ class ReadTableForOpen:
stg.filename_calibration_file = next(it)
stg.range_lin_interp = np_f64_parse(next(it))
stg.M_profile_fine = np_f64_parse(next(it))
stg.ks = np_f64_parse(next(it))
stg.sv = np_f64_parse(next(it))
stg.ks = np_f64_parse(next(it)).tolist()
stg.sv = np_f64_parse(next(it)).tolist()
stg.X_exponent = np_f64_parse(next(it)).tolist()
stg.alpha_s = np_f64_parse(next(it))
stg.zeta = np_f64_parse(next(it))
stg.FCB = np_f64_parse(next(it))
stg.depth_real = np_f64_parse(next(it))
stg.lin_reg = np_f64_parse(next(it))
stg.alpha_s = np_f64_parse(next(it)).tolist()
stg.zeta = np_f64_parse(next(it)).tolist()
stg.FCB = np_f64_parse(next(it)).tolist()
stg.depth_real = np_f64_parse(next(it)).tolist()
stg.lin_reg = np_f64_parse(next(it)).tolist()

View File

@ -867,6 +867,7 @@ class SedimentCalibrationTab(QWidget):
self.function_pushbutton_update_acoustic_file()
self._update_calibration_parameters()
self._update_calibration()
self.function_pushbutton_plot_sample()
self.blockSignals(False)
@ -893,12 +894,41 @@ class SedimentCalibrationTab(QWidget):
self.combobox_sand_sample_choice\
.setCurrentIndex(stg.calib_sand_target)
self.update_label_freq1_for_calibration()
self.update_label_freq2_for_calibration()
self.update_label_kt_value_for_calibration()
self.combobox_sand_sample_choice.blockSignals(False)
self.combobox_fine_sample_choice.blockSignals(False)
self.combobox_freq2.blockSignals(False)
self.combobox_freq1.blockSignals(False)
self.combobox_acoustic_data_choice.blockSignals(False)
def _update_calibration(self):
self.groupbox_sediment_calibration_compute.blockSignals(True)
if stg.filename_calibration_file == "":
self.groupbox_sediment_calibration_compute\
.setChecked(True)
self.groupbox_sediment_calibration_import\
.setChecked(False)
self.lineEdit_ks_freq1.setText(f"{stg.ks[0]:.5f}")
self.lineEdit_ks_freq2.setText(f"{stg.ks[1]:.5f}")
self.lineEdit_sv_freq1.setText(f"{stg.sv[0]:.5f}")
self.lineEdit_sv_freq2.setText(f"{stg.sv[1]:.5f}")
self.lineEdit_X.setText(f"{stg.X_exponent[0]:.5f}")
self.lineEdit_alphas_freq1.setText(f"{stg.alpha_s[0]:.5f}")
self.lineEdit_alphas_freq2.setText(f"{stg.alpha_s[1]:.5f}")
self.lineEdit_zeta_freq1.setText(f"{stg.zeta[0]:.5f}")
self.lineEdit_zeta_freq2.setText(f"{stg.zeta[1]:.5f}")
self.groupbox_sediment_calibration_compute.blockSignals(False)
def function_pushbutton_update_acoustic_file(self):
if len(stg.data_preprocessed) == 0:
return