Acoustic data: Clear 'clear_files_from_ListWidget' method.
parent
4c024cbb42
commit
f0150443e3
|
|
@ -1518,27 +1518,14 @@ class AcousticDataTab(QWidget):
|
|||
self.slider.setMaximum(10)
|
||||
|
||||
def clear_files_from_ListWidget(self):
|
||||
self.fileListWidget.blockSignals(True)
|
||||
|
||||
list_to_clear = [
|
||||
"stg.acoustic_data", "stg.date", "stg.hour",
|
||||
"stg.freq", "stg.freq_text",
|
||||
"stg.nb_profiles", "stg.nb_profiles_per_sec",
|
||||
"stg.nb_cells", "stg.cell_size",
|
||||
"stg.pulse_length", "stg.nb_pings_per_sec",
|
||||
"stg.nb_pings_averaged_per_profile",
|
||||
"stg.kt_read", "stg.kt_corrected", "stg.gain_rx", "stg.gain_tx",
|
||||
"stg.filename_BS_raw_data", "stg.path_BS_raw_data",
|
||||
"stg.BS_raw_data", "stg.time", "stg.depth",
|
||||
"stg.BS_raw_data_reshape", "stg.time_reshape", "stg.depth_reshape",
|
||||
"stg.rmin", "stg.rmax", "stg.tmin", "stg.tmax",
|
||||
"stg.time_cross_section", "stg.depth_cross_section",
|
||||
"stg.BS_cross_section", "stg.BS_stream_bed"
|
||||
]
|
||||
self.clear_files_data()
|
||||
self.clear_files_from_ListWidget_reset()
|
||||
|
||||
for k in list_to_clear:
|
||||
if isinstance(eval(k), list):
|
||||
exec(k + ".clear()")
|
||||
self.fileListWidget.blockSignals(False)
|
||||
|
||||
def clear_files_from_ListWidget_reset(self):
|
||||
self.fileListWidget.clear()
|
||||
# self.fileListWidget.takeItem(0)
|
||||
|
||||
|
|
@ -1615,6 +1602,27 @@ class AcousticDataTab(QWidget):
|
|||
self.slider.setValue(0)
|
||||
self.slider.setMaximum(10)
|
||||
|
||||
def clear_files_data(self):
|
||||
list_to_clear = [
|
||||
stg.acoustic_data, stg.date, stg.hour,
|
||||
stg.freq, stg.freq_text,
|
||||
stg.nb_profiles, stg.nb_profiles_per_sec,
|
||||
stg.nb_cells, stg.cell_size,
|
||||
stg.pulse_length, stg.nb_pings_per_sec,
|
||||
stg.nb_pings_averaged_per_profile,
|
||||
stg.kt_read, stg.kt_corrected, stg.gain_rx, stg.gain_tx,
|
||||
stg.filename_BS_raw_data, stg.path_BS_raw_data,
|
||||
stg.BS_raw_data, stg.time, stg.depth,
|
||||
stg.BS_raw_data_reshape, stg.time_reshape, stg.depth_reshape,
|
||||
stg.rmin, stg.rmax, stg.tmin, stg.tmax,
|
||||
stg.time_cross_section, stg.depth_cross_section,
|
||||
stg.BS_cross_section, stg.BS_stream_bed
|
||||
]
|
||||
|
||||
for k in list_to_clear:
|
||||
if isinstance(k, list):
|
||||
k.clear()
|
||||
|
||||
def load_BS_acoustic_raw_data(self):
|
||||
if self.fileListWidget.count() == 0:
|
||||
for p, f in zip(stg.path_BS_raw_data,
|
||||
|
|
@ -2001,7 +2009,7 @@ class AcousticDataTab(QWidget):
|
|||
14, 1, 1, 1, Qt.AlignLeft
|
||||
)
|
||||
|
||||
if self.checkbox_kt.isChecked():
|
||||
if self.checkbox_kt.isChecked() and len(stg.kt_corrected) > freq_id:
|
||||
if self.combobox_frequency_information.count() > 0:
|
||||
self.lineEdit_kt.setText(
|
||||
str("%.4f" % stg.kt_corrected[freq_id])
|
||||
|
|
|
|||
Loading…
Reference in New Issue