SQL: Read: Fix some data initialisation.
parent
0d651fe232
commit
e300cfe643
|
|
@ -66,7 +66,6 @@ class ReadTableForOpen:
|
||||||
self.read_table()
|
self.read_table()
|
||||||
self.opened = True
|
self.opened = True
|
||||||
|
|
||||||
|
|
||||||
def execute(self, query):
|
def execute(self, query):
|
||||||
return self._cur.execute(query).fetchall()
|
return self._cur.execute(query).fetchall()
|
||||||
|
|
||||||
|
|
@ -125,6 +124,8 @@ class ReadTableForOpen:
|
||||||
stg.noise_value.append(data[6])
|
stg.noise_value.append(data[6])
|
||||||
stg.data_preprocessed.append(data[7])
|
stg.data_preprocessed.append(data[7])
|
||||||
|
|
||||||
|
self.read_table_acoustic_file_init_others_data()
|
||||||
|
|
||||||
logger.debug("data acoustic file:")
|
logger.debug("data acoustic file:")
|
||||||
logger.debug(f"- {stg.filename_BS_raw_data}")
|
logger.debug(f"- {stg.filename_BS_raw_data}")
|
||||||
logger.debug(f"- {stg.ABS_name}")
|
logger.debug(f"- {stg.ABS_name}")
|
||||||
|
|
@ -134,6 +135,14 @@ class ReadTableForOpen:
|
||||||
logger.debug(f"- {stg.noise_value}")
|
logger.debug(f"- {stg.noise_value}")
|
||||||
logger.debug(f"- {stg.data_preprocessed}")
|
logger.debug(f"- {stg.data_preprocessed}")
|
||||||
|
|
||||||
|
def read_table_acoustic_file_init_others_data(self):
|
||||||
|
stg.kt2D.append(np.array([]))
|
||||||
|
stg.kt3D.append(np.array([]))
|
||||||
|
stg.J_cross_section.append([np.array([]), np.array([])])
|
||||||
|
stg.VBI_cross_section.append(np.array([]))
|
||||||
|
stg.SSC_fine.append(np.array([]))
|
||||||
|
stg.SSC_sand.append(np.array([]))
|
||||||
|
|
||||||
def read_table_measure(self):
|
def read_table_measure(self):
|
||||||
stg.date = [0]*len(stg.acoustic_data)
|
stg.date = [0]*len(stg.acoustic_data)
|
||||||
stg.hour = [0]*len(stg.acoustic_data)
|
stg.hour = [0]*len(stg.acoustic_data)
|
||||||
|
|
|
||||||
|
|
@ -1750,8 +1750,10 @@ class AcousticDataTab(QWidget):
|
||||||
|
|
||||||
def fill_measurements_information_groupbox_datetime(self):
|
def fill_measurements_information_groupbox_datetime(self):
|
||||||
file_id = self.fileListWidget.currentRow()
|
file_id = self.fileListWidget.currentRow()
|
||||||
print("file_id ", file_id)
|
|
||||||
print("stg.date ", stg.date)
|
logger.debug(f"file_id: {file_id}")
|
||||||
|
logger.debug(f"stg.date: {stg.date}")
|
||||||
|
|
||||||
self.label_date_acoustic_file.clear()
|
self.label_date_acoustic_file.clear()
|
||||||
|
|
||||||
self.label_date_acoustic_file.setText(
|
self.label_date_acoustic_file.setText(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue