Acoustic data: Fix distance to free surface computation (without reload input file).
parent
967540d7f7
commit
965b222e65
|
|
@ -1202,50 +1202,32 @@ class AcousticDataTab(QWidget):
|
||||||
msgBox.exec()
|
msgBox.exec()
|
||||||
|
|
||||||
self.lineEdit_distance_from_ABS_to_free_surface.setText("0.00")
|
self.lineEdit_distance_from_ABS_to_free_surface.setText("0.00")
|
||||||
else:
|
return
|
||||||
stg.distance_from_ABS_to_free_surface[
|
|
||||||
self.fileListWidget.currentRow()
|
def refresh_distance_from_ABS_to_free_surface(self):
|
||||||
] = (
|
self.pushbutton_distance_from_ABS_to_free_surface.blockSignals(True)
|
||||||
|
|
||||||
|
data_id = self.fileListWidget.currentRow()
|
||||||
|
|
||||||
|
previous = stg.distance_from_ABS_to_free_surface[data_id]
|
||||||
|
new = (
|
||||||
float(
|
float(
|
||||||
self.lineEdit_distance_from_ABS_to_free_surface\
|
self.lineEdit_distance_from_ABS_to_free_surface\
|
||||||
.text().replace(",", ".")
|
.text().replace(",", ".")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
self.lineEdit_distance_from_ABS_to_free_surface.setText(f"{new}")
|
||||||
|
|
||||||
self.lineEdit_distance_from_ABS_to_free_surface.setText(
|
logger.debug(f"prev: {previous}, new: {new}")
|
||||||
str(
|
|
||||||
"%4s" % stg.distance_from_ABS_to_free_surface[
|
|
||||||
self.fileListWidget.currentRow()
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
def refresh_distance_from_ABS_to_free_surface(self):
|
stg.depth[data_id] = stg.depth[data_id] - previous
|
||||||
self.pushbutton_distance_from_ABS_to_free_surface.blockSignals(True)
|
stg.depth_reshape[data_id] = stg.depth_reshape[data_id] - previous
|
||||||
|
|
||||||
if self.combobox_ABS_system_choice.currentIndex() == 1:
|
stg.depth[data_id] = stg.depth[data_id] + new
|
||||||
acoustic_data = AcousticDataLoader(
|
stg.depth_reshape[data_id] = stg.depth_reshape[data_id] + new
|
||||||
stg.path_BS_raw_data[self.fileListWidget.currentRow()] + "/" +
|
|
||||||
stg.filename_BS_raw_data[self.fileListWidget.currentRow()]
|
|
||||||
)
|
|
||||||
elif self.combobox_ABS_system_choice.currentIndex() == 2:
|
|
||||||
acoustic_data = AcousticDataLoaderUBSediFlow(
|
|
||||||
stg.path_BS_raw_data[self.fileListWidget.currentRow()] + "/" +
|
|
||||||
stg.filename_BS_raw_data[self.fileListWidget.currentRow()]
|
|
||||||
)
|
|
||||||
|
|
||||||
stg.depth[self.fileListWidget.currentRow()] = acoustic_data._r
|
stg.depth_cross_section[data_id] = stg.depth[data_id]
|
||||||
stg.depth_reshape[self.fileListWidget.currentRow()] = acoustic_data.reshape_r()
|
stg.distance_from_ABS_to_free_surface[data_id] = new
|
||||||
|
|
||||||
stg.depth[self.fileListWidget.currentRow()] = (
|
|
||||||
stg.depth[self.fileListWidget.currentRow()] +
|
|
||||||
stg.distance_from_ABS_to_free_surface[self.fileListWidget.currentRow()])
|
|
||||||
|
|
||||||
stg.depth_reshape[self.fileListWidget.currentRow()] = (
|
|
||||||
stg.depth_reshape[self.fileListWidget.currentRow()] +
|
|
||||||
stg.distance_from_ABS_to_free_surface[self.fileListWidget.currentRow()])
|
|
||||||
|
|
||||||
stg.depth_cross_section[self.fileListWidget.currentRow()] = stg.depth[self.fileListWidget.currentRow()]
|
|
||||||
|
|
||||||
self.fill_table()
|
self.fill_table()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue