Compare commits
No commits in common. "84fe5738a30a571edd649f0dd8f603df85c9468d" and "79ee1c3cfa39c6c41bc46dc99afef88a6ba276a8" have entirely different histories.
84fe5738a3
...
79ee1c3cfa
|
|
@ -113,6 +113,7 @@ class ReadTableForOpen:
|
||||||
WHERE (acoustic_data = {k})
|
WHERE (acoustic_data = {k})
|
||||||
'''
|
'''
|
||||||
data = self.execute(query)[0]
|
data = self.execute(query)[0]
|
||||||
|
print("data acoustic file", data)
|
||||||
|
|
||||||
stg.filename_BS_raw_data.append(
|
stg.filename_BS_raw_data.append(
|
||||||
str(data[1]) + '.aqa'
|
str(data[1]) + '.aqa'
|
||||||
|
|
@ -433,18 +434,10 @@ class ReadTableForOpen:
|
||||||
for dest, resh in SNR_vars:
|
for dest, resh in SNR_vars:
|
||||||
SNR = np_f64_parse(next(it))
|
SNR = np_f64_parse(next(it))
|
||||||
|
|
||||||
try:
|
if len(SNR) == 0:
|
||||||
if len(SNR) != 0:
|
|
||||||
dest.append(SNR.reshape(resh[i].shape))
|
|
||||||
else:
|
|
||||||
dest.append(np.array([]))
|
|
||||||
except:
|
|
||||||
logger.warning(
|
|
||||||
"SQL: read_table_BS_raw_data_SNR: "
|
|
||||||
+ "failed to reshape data from "
|
|
||||||
+ f"{SNR.shape} to {resh[i].shape}"
|
|
||||||
)
|
|
||||||
dest.append(np.array([]))
|
dest.append(np.array([]))
|
||||||
|
else:
|
||||||
|
dest.append(SNR.reshape(resh[i].shape))
|
||||||
|
|
||||||
def read_table_BS_raw_data_rest(self, query, i):
|
def read_table_BS_raw_data_rest(self, query, i):
|
||||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||||
|
|
|
||||||
|
|
@ -815,7 +815,6 @@ class AcousticDataTab(QWidget):
|
||||||
self.fill_table()
|
self.fill_table()
|
||||||
self.compute_tmin_tmax()
|
self.compute_tmin_tmax()
|
||||||
self.compute_rmin_rmax()
|
self.compute_rmin_rmax()
|
||||||
# self.compute_time_cross_section()
|
|
||||||
self.update_frequency_combobox()
|
self.update_frequency_combobox()
|
||||||
# self.fileListWidget.itemSelectionChanged.connect(self.plot_backscattered_acoustic_signal_recording)
|
# self.fileListWidget.itemSelectionChanged.connect(self.plot_backscattered_acoustic_signal_recording)
|
||||||
# self.fileListWidget.itemSelectionChanged.connect(self.plot_profile)
|
# self.fileListWidget.itemSelectionChanged.connect(self.plot_profile)
|
||||||
|
|
@ -826,13 +825,8 @@ class AcousticDataTab(QWidget):
|
||||||
self.fileListWidget.blockSignals(False)
|
self.fileListWidget.blockSignals(False)
|
||||||
|
|
||||||
def print_selected_file(self):
|
def print_selected_file(self):
|
||||||
logger.debug(
|
print(f"Selected file in list widget : {self.fileListWidget.selectedItems()}")
|
||||||
f"Selected file in list widget : {self.fileListWidget.selectedItems()}"
|
print("self.fileListWidget.selectedItems()[1:] : ", self.fileListWidget.selectedItems()[1:])
|
||||||
)
|
|
||||||
logger.debug(
|
|
||||||
"self.fileListWidget.selectedItems()[1:] : "
|
|
||||||
+ f"{self.fileListWidget.selectedItems()[1:]}"
|
|
||||||
)
|
|
||||||
if len(self.fileListWidget.selectedItems()) > self.max_selected_file:
|
if len(self.fileListWidget.selectedItems()) > self.max_selected_file:
|
||||||
self.fileListWidget.setSelectionMode(1)
|
self.fileListWidget.setSelectionMode(1)
|
||||||
|
|
||||||
|
|
@ -1250,7 +1244,6 @@ class AcousticDataTab(QWidget):
|
||||||
self.fill_table()
|
self.fill_table()
|
||||||
|
|
||||||
self.compute_rmin_rmax()
|
self.compute_rmin_rmax()
|
||||||
self.compute_time_cross_section()
|
|
||||||
self.compute_depth_cross_section()
|
self.compute_depth_cross_section()
|
||||||
self.set_range_for_spinboxes_bathymetry()
|
self.set_range_for_spinboxes_bathymetry()
|
||||||
|
|
||||||
|
|
@ -1455,6 +1448,13 @@ class AcousticDataTab(QWidget):
|
||||||
self.fileListWidget.blockSignals(False)
|
self.fileListWidget.blockSignals(False)
|
||||||
|
|
||||||
def rename_file_in_ListWidget(self, event):
|
def rename_file_in_ListWidget(self, event):
|
||||||
|
if event == QEvent.MouseButtonPress:
|
||||||
|
print("c'est bon")
|
||||||
|
if event.button == Qt.RightButton:
|
||||||
|
print("Right button clicked")
|
||||||
|
elif event.button == Qt.LeftButton:
|
||||||
|
print("Left button clicked")
|
||||||
|
|
||||||
if event.type() == QEvent.ContextMenu:
|
if event.type() == QEvent.ContextMenu:
|
||||||
menu = QMenu()
|
menu = QMenu()
|
||||||
menu.addAction('Rename')
|
menu.addAction('Rename')
|
||||||
|
|
@ -2143,6 +2143,17 @@ class AcousticDataTab(QWidget):
|
||||||
self.tableModel = TableModel(stg.DataFrame_acoustic)
|
self.tableModel = TableModel(stg.DataFrame_acoustic)
|
||||||
self.tableView.setModel(self.tableModel)
|
self.tableView.setModel(self.tableModel)
|
||||||
|
|
||||||
|
def export_table(self):
|
||||||
|
if self.tableWidget.columnCount() == 10:
|
||||||
|
msgBox = QMessageBox()
|
||||||
|
msgBox.setWindowTitle("Export table Error")
|
||||||
|
msgBox.setIcon(QMessageBox.Warning)
|
||||||
|
msgBox.setText("Fill table before export table")
|
||||||
|
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||||
|
msgBox.exec()
|
||||||
|
else:
|
||||||
|
print("export table")
|
||||||
|
|
||||||
def transect_xaxis_choice(self):
|
def transect_xaxis_choice(self):
|
||||||
if self.groupbox_xaxis_time.isChecked() == True:
|
if self.groupbox_xaxis_time.isChecked() == True:
|
||||||
self.groupbox_xaxis_space.setChecked(False)
|
self.groupbox_xaxis_space.setChecked(False)
|
||||||
|
|
@ -2256,7 +2267,7 @@ class AcousticDataTab(QWidget):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)[0][0] + 1,
|
)[0][0] + 1,
|
||||||
time_max
|
time_max
|
||||||
))
|
))
|
||||||
|
|
||||||
stg.time_cross_section[data_id] = (
|
stg.time_cross_section[data_id] = (
|
||||||
|
|
|
||||||
|
|
@ -301,6 +301,7 @@ class Ui_MainWindow(object):
|
||||||
msg_box.exec()
|
msg_box.exec()
|
||||||
|
|
||||||
def about_window(self):
|
def about_window(self):
|
||||||
|
print("about")
|
||||||
aw = AboutWindow()
|
aw = AboutWindow()
|
||||||
aw.exec()
|
aw.exec()
|
||||||
|
|
||||||
|
|
@ -313,6 +314,7 @@ class Ui_MainWindow(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
def open_doc_file(self, filename):
|
def open_doc_file(self, filename):
|
||||||
|
print(self.current_file_path("filename.pdf"))
|
||||||
QtGui.QDesktopServices.openUrl(
|
QtGui.QDesktopServices.openUrl(
|
||||||
QtCore.QUrl(
|
QtCore.QUrl(
|
||||||
f"file://{self.current_file_path(filename)}"
|
f"file://{self.current_file_path(filename)}"
|
||||||
|
|
@ -333,11 +335,15 @@ class Ui_MainWindow(object):
|
||||||
name = QtWidgets.QFileDialog.getExistingDirectory(
|
name = QtWidgets.QFileDialog.getExistingDirectory(
|
||||||
caption="Select Directory - Acoustic BS raw data Table"
|
caption="Select Directory - Acoustic BS raw data Table"
|
||||||
)
|
)
|
||||||
|
print("name table to save ", name)
|
||||||
|
|
||||||
# --- Save the raw acoustic backscatter data from a
|
# --- Save the raw acoustic backscatter data from a
|
||||||
# --- Dataframe to csv file ---
|
# --- Dataframe to csv file ---
|
||||||
|
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
|
print("len(stg.BS_raw_data_reshape) ",
|
||||||
|
len(stg.BS_raw_data_reshape))
|
||||||
|
|
||||||
if name:
|
if name:
|
||||||
for i in range(len(stg.BS_raw_data_reshape)):
|
for i in range(len(stg.BS_raw_data_reshape)):
|
||||||
header_list = []
|
header_list = []
|
||||||
|
|
@ -387,7 +393,8 @@ class Ui_MainWindow(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
t1 = time.time() - t0
|
t1 = time.time() - t0
|
||||||
logger.debug(f"Time duration export BS {t1}")
|
print("time duration export BS ", t1)
|
||||||
|
print("table of BS value Export finished")
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
_translate = QtCore.QCoreApplication.translate
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
|
|
||||||
|
|
@ -2003,6 +2003,9 @@ class SedimentCalibrationTab(QWidget):
|
||||||
bs_data = data
|
bs_data = data
|
||||||
break
|
break
|
||||||
|
|
||||||
|
print(f"{stg.depth_2D[i].shape}")
|
||||||
|
print(f"{stg.depth_2D[i]}")
|
||||||
|
|
||||||
J_cross_section_freq1 = self.inv_hc.j_cross_section(
|
J_cross_section_freq1 = self.inv_hc.j_cross_section(
|
||||||
BS = bs_data[i][
|
BS = bs_data[i][
|
||||||
stg.frequencies_for_calibration[0][1], :, :
|
stg.frequencies_for_calibration[0][1], :, :
|
||||||
|
|
|
||||||
|
|
@ -548,8 +548,9 @@ class SignalProcessingTab(QWidget):
|
||||||
)
|
)
|
||||||
|
|
||||||
def update_SignalPreprocessingTab(self):
|
def update_SignalPreprocessingTab(self):
|
||||||
|
|
||||||
""" The tab is updated in two cases :
|
""" The tab is updated in two cases :
|
||||||
- the user remove a file (in the list widget) in the first tab (Acoustic data), so that the combobox
|
- the user remove a file (in the list widget) in the first tab (Acoustic data), so that the combobox
|
||||||
of data to be processed is updated,
|
of data to be processed is updated,
|
||||||
- the user change the limits of one or all the records in the first tab (Acoustic data) """
|
- the user change the limits of one or all the records in the first tab (Acoustic data) """
|
||||||
if len(stg.filename_BS_raw_data) == 0:
|
if len(stg.filename_BS_raw_data) == 0:
|
||||||
|
|
@ -626,68 +627,13 @@ class SignalProcessingTab(QWidget):
|
||||||
|
|
||||||
if stg.noise_method[data_id] == 0:
|
if stg.noise_method[data_id] == 0:
|
||||||
if stg.filename_BS_noise_data[data_id] != "":
|
if stg.filename_BS_noise_data[data_id] != "":
|
||||||
if len(stg.BS_noise_raw_data) == 0:
|
self.load_noise_data_and_compute_SNR()
|
||||||
self.load_noise_data_and_compute_SNR()
|
|
||||||
else:
|
|
||||||
self.compute_noise()
|
|
||||||
elif stg.noise_method[data_id] == 1:
|
elif stg.noise_method[data_id] == 1:
|
||||||
self.compute_noise_from_profile_tail_value()
|
self.compute_noise_from_profile_tail_value()
|
||||||
|
|
||||||
self.remove_point_with_snr_filter()
|
self.remove_point_with_snr_filter()
|
||||||
self.compute_averaged_BS_data()
|
self.compute_averaged_BS_data()
|
||||||
|
|
||||||
def compute_noise(self):
|
|
||||||
data_id = max(0, self.combobox_acoustic_data_choice.currentIndex())
|
|
||||||
|
|
||||||
if stg.time_cross_section[data_id].shape != (0,):
|
|
||||||
stg.time_noise[data_id] = (
|
|
||||||
stg.time_cross_section[data_id]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
stg.time_noise[data_id] = (
|
|
||||||
stg.time[data_id]
|
|
||||||
)
|
|
||||||
if stg.depth_cross_section[data_id].shape != (0,):
|
|
||||||
stg.depth_noise[data_id] = (
|
|
||||||
stg.depth_cross_section[data_id]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
stg.depth_noise[data_id] = (
|
|
||||||
stg.depth[data_id]
|
|
||||||
)
|
|
||||||
|
|
||||||
if self._is_correct_shape(stg.BS_stream_bed):
|
|
||||||
BS_data = stg.BS_stream_bed
|
|
||||||
SNR_data = stg.SNR_stream_bed
|
|
||||||
elif self._is_correct_shape(stg.BS_cross_section):
|
|
||||||
BS_data = stg.BS_cross_section
|
|
||||||
SNR_data = stg.SNR_cross_section
|
|
||||||
else:
|
|
||||||
BS_data = stg.BS_raw_data
|
|
||||||
SNR_data = stg.SNR_raw_data
|
|
||||||
|
|
||||||
noise = np.zeros(BS_data[data_id].shape)
|
|
||||||
for f, _ in enumerate(BS_data[data_id]):
|
|
||||||
noise[f, :, :] = np.mean(
|
|
||||||
stg.BS_noise_raw_data[data_id][f, :, :], axis=(0, 1)
|
|
||||||
)
|
|
||||||
|
|
||||||
stg.BS_noise_averaged_data[data_id] = noise
|
|
||||||
|
|
||||||
SNR_data[data_id] = (
|
|
||||||
np.divide(
|
|
||||||
(
|
|
||||||
BS_data[data_id] - stg.BS_noise_averaged_data[data_id]
|
|
||||||
) ** 2,
|
|
||||||
stg.BS_noise_averaged_data[data_id] ** 2
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
self.combobox_frequency_profile.clear()
|
|
||||||
self.combobox_frequency_profile.addItems(
|
|
||||||
[f for f in stg.freq_text[data_id]]
|
|
||||||
)
|
|
||||||
|
|
||||||
def replot(self):
|
def replot(self):
|
||||||
self.plot_averaged_profile_tail()
|
self.plot_averaged_profile_tail()
|
||||||
self.plot_transect_with_SNR_data()
|
self.plot_transect_with_SNR_data()
|
||||||
|
|
@ -963,7 +909,7 @@ class SignalProcessingTab(QWidget):
|
||||||
|
|
||||||
stg.BS_stream_bed_pre_process_SNR[data_id] = np.array([])
|
stg.BS_stream_bed_pre_process_SNR[data_id] = np.array([])
|
||||||
stg.BS_stream_bed_pre_process_average[data_id] = np.array([])
|
stg.BS_stream_bed_pre_process_average[data_id] = np.array([])
|
||||||
|
print("stg.noise_method[data_id]", stg.noise_method[data_id])
|
||||||
if stg.noise_method[data_id] == 0:
|
if stg.noise_method[data_id] == 0:
|
||||||
self.lineEdit_noise_file.clear()
|
self.lineEdit_noise_file.clear()
|
||||||
|
|
||||||
|
|
@ -1088,42 +1034,50 @@ class SignalProcessingTab(QWidget):
|
||||||
|
|
||||||
stg.noise_method[data_id] = 0
|
stg.noise_method[data_id] = 0
|
||||||
|
|
||||||
noise_data = AcousticDataLoader(
|
noise_data = AcousticDataLoader(stg.path_BS_noise_data[data_id] +
|
||||||
os.path.join(
|
"/" +
|
||||||
stg.path_BS_noise_data[data_id],
|
stg.filename_BS_noise_data[data_id])
|
||||||
stg.filename_BS_noise_data[data_id]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
stg.BS_noise_raw_data[data_id] = noise_data._BS_raw_data
|
stg.BS_noise_raw_data[data_id] = noise_data._BS_raw_data
|
||||||
|
|
||||||
stg.time_noise[data_id] = noise_data._time
|
stg.time_noise[data_id] = noise_data._time
|
||||||
stg.depth_noise[data_id] = noise_data._r
|
stg.depth_noise[data_id] = noise_data._r
|
||||||
|
|
||||||
if stg.BS_stream_bed[data_id].shape != (0,):
|
if stg.BS_stream_bed[data_id].shape != (0,):
|
||||||
BS_data = stg.BS_stream_bed
|
|
||||||
SNR_data = stg.SNR_stream_bed
|
noise = np.zeros(stg.BS_stream_bed[data_id].shape)
|
||||||
|
for f, _ in enumerate(noise_data._freq):
|
||||||
|
noise[f, :, :] = np.mean(
|
||||||
|
stg.BS_noise_raw_data[data_id][f, :, :], axis=(0, 1))
|
||||||
|
stg.BS_noise_averaged_data[data_id] = noise
|
||||||
|
stg.SNR_stream_bed[data_id] = (
|
||||||
|
np.divide((stg.BS_stream_bed[data_id] -
|
||||||
|
stg.BS_noise_averaged_data[data_id]) ** 2,
|
||||||
|
stg.BS_noise_averaged_data[data_id] ** 2))
|
||||||
|
|
||||||
elif stg.BS_cross_section[data_id].shape != (0,):
|
elif stg.BS_cross_section[data_id].shape != (0,):
|
||||||
BS_data = stg.BS_cross_section
|
|
||||||
SNR_data = stg.SNR_cross_section
|
noise = np.zeros(stg.BS_cross_section[data_id].shape)
|
||||||
|
for f, _ in enumerate(noise_data._freq):
|
||||||
|
noise[f, :, :] = np.mean(
|
||||||
|
stg.BS_noise_raw_data[data_id][f, :, :], axis=(0, 1))
|
||||||
|
stg.BS_noise_averaged_data[data_id] = noise
|
||||||
|
stg.SNR_cross_section[data_id] = (
|
||||||
|
np.divide((stg.BS_cross_section[data_id] -
|
||||||
|
stg.BS_noise_averaged_data[data_id]) ** 2,
|
||||||
|
stg.BS_noise_averaged_data[data_id] ** 2))
|
||||||
|
# stg.SNR_reshape = np.reshape(stg.SNR_cross_section, (stg.r.shape[1] * stg.t.shape[1], stg.freq.shape[0]), order="F")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
BS_data = stg.BS_raw_data
|
|
||||||
SNR_data = stg.SNR_raw_data
|
|
||||||
|
|
||||||
noise = np.zeros(BS_data[data_id].shape)
|
noise = np.zeros(stg.BS_raw_data[data_id].shape)
|
||||||
for f, _ in enumerate(noise_data._freq):
|
for f, _ in enumerate(noise_data._freq):
|
||||||
noise[f, :, :] = np.mean(
|
noise[f, :, :] = np.mean(
|
||||||
stg.BS_noise_raw_data[data_id][f, :, :], axis=(0, 1)
|
stg.BS_noise_raw_data[data_id][f, :, :], axis=(0, 1))
|
||||||
)
|
stg.BS_noise_averaged_data[data_id] = noise
|
||||||
|
stg.SNR_raw_data[data_id] = (
|
||||||
stg.BS_noise_averaged_data[data_id] = noise
|
np.divide((stg.BS_raw_data[data_id] -
|
||||||
SNR_data[data_id] = (
|
stg.BS_noise_averaged_data[data_id]) ** 2,
|
||||||
np.divide(
|
stg.BS_noise_averaged_data[data_id] ** 2))
|
||||||
(
|
|
||||||
BS_data[data_id] - stg.BS_noise_averaged_data[data_id]
|
|
||||||
) ** 2,
|
|
||||||
stg.BS_noise_averaged_data[data_id] ** 2
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
def open_plot_noise_window(self):
|
def open_plot_noise_window(self):
|
||||||
pnw = PlotNoiseWindow()
|
pnw = PlotNoiseWindow()
|
||||||
|
|
@ -1137,11 +1091,6 @@ class SignalProcessingTab(QWidget):
|
||||||
float(self.lineEdit_profile_tail_value.text().replace(",", "."))
|
float(self.lineEdit_profile_tail_value.text().replace(",", "."))
|
||||||
)
|
)
|
||||||
|
|
||||||
self.compute_noise_from_profile_tail_value_compute()
|
|
||||||
|
|
||||||
def compute_noise_from_profile_tail_value_compute(self):
|
|
||||||
data_id = max(0, self.combobox_acoustic_data_choice.currentIndex())
|
|
||||||
|
|
||||||
if stg.time_cross_section[data_id].shape != (0,):
|
if stg.time_cross_section[data_id].shape != (0,):
|
||||||
stg.time_noise[data_id] = (
|
stg.time_noise[data_id] = (
|
||||||
stg.time_cross_section[data_id]
|
stg.time_cross_section[data_id]
|
||||||
|
|
@ -1161,38 +1110,47 @@ class SignalProcessingTab(QWidget):
|
||||||
|
|
||||||
# --- Compute noise from value and compute SNR ---
|
# --- Compute noise from value and compute SNR ---
|
||||||
if self._is_correct_shape(stg.BS_stream_bed):
|
if self._is_correct_shape(stg.BS_stream_bed):
|
||||||
BS_data = stg.BS_stream_bed
|
stg.BS_noise_raw_data[data_id] = np.array([])
|
||||||
SNR_data = stg.SNR_stream_bed
|
stg.BS_noise_raw_data[data_id] = (
|
||||||
|
np.full(stg.BS_stream_bed[data_id].shape,
|
||||||
|
float(self.lineEdit_profile_tail_value.text().replace(",", "."))))
|
||||||
|
|
||||||
|
stg.BS_noise_averaged_data[data_id] = (
|
||||||
|
stg.BS_noise_raw_data[data_id][:, :,
|
||||||
|
:stg.BS_stream_bed[data_id].shape[2]])
|
||||||
|
stg.SNR_stream_bed[data_id] = (
|
||||||
|
np.divide((stg.BS_stream_bed[data_id]
|
||||||
|
- stg.BS_noise_raw_data[data_id]) ** 2,
|
||||||
|
stg.BS_noise_raw_data[data_id] ** 2))
|
||||||
|
|
||||||
elif self._is_correct_shape(stg.BS_cross_section):
|
elif self._is_correct_shape(stg.BS_cross_section):
|
||||||
BS_data = stg.BS_cross_section
|
stg.BS_noise_raw_data[data_id] = (
|
||||||
SNR_data = stg.SNR_cross_section
|
np.full(stg.BS_cross_section[data_id].shape,
|
||||||
|
float(self.lineEdit_profile_tail_value.text().replace(",", "."))))
|
||||||
|
|
||||||
|
stg.BS_noise_averaged_data[data_id] = (
|
||||||
|
stg.BS_noise_raw_data[data_id][:, :,
|
||||||
|
:stg.BS_cross_section[data_id].shape[2]])
|
||||||
|
stg.SNR_cross_section[data_id] = (
|
||||||
|
np.divide((stg.BS_cross_section[data_id]
|
||||||
|
- stg.BS_noise_raw_data[data_id]) ** 2,
|
||||||
|
stg.BS_noise_raw_data[data_id] ** 2)) #
|
||||||
|
|
||||||
else:
|
else:
|
||||||
BS_data = stg.BS_raw_data
|
stg.BS_noise_raw_data[data_id] = (
|
||||||
SNR_data = stg.SNR_raw_data
|
np.full(stg.BS_raw_data[data_id].shape,
|
||||||
|
float(self.lineEdit_profile_tail_value.text().replace(",", "."))))
|
||||||
|
|
||||||
stg.BS_noise_raw_data[data_id] = (
|
stg.BS_noise_averaged_data[data_id] = (
|
||||||
np.full(
|
stg.BS_noise_raw_data[data_id])
|
||||||
BS_data[data_id].shape,
|
stg.SNR_raw_data[data_id] = (
|
||||||
float(self.lineEdit_profile_tail_value.text().replace(",", "."))
|
np.divide((stg.BS_raw_data[data_id]
|
||||||
)
|
- stg.BS_noise_raw_data[data_id]) ** 2,
|
||||||
)
|
stg.BS_noise_raw_data[data_id] ** 2))
|
||||||
|
|
||||||
stg.BS_noise_averaged_data[data_id] = (
|
|
||||||
stg.BS_noise_raw_data[data_id]
|
|
||||||
)
|
|
||||||
SNR_data[data_id] = (
|
|
||||||
np.divide(
|
|
||||||
(
|
|
||||||
BS_data[data_id] - stg.BS_noise_raw_data[data_id]
|
|
||||||
) ** 2,
|
|
||||||
stg.BS_noise_raw_data[data_id] ** 2
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
self.combobox_frequency_profile.clear()
|
self.combobox_frequency_profile.clear()
|
||||||
self.combobox_frequency_profile.addItems(
|
self.combobox_frequency_profile.addItems(
|
||||||
[f for f in stg.freq_text[data_id]]
|
[f for f in stg.freq_text[data_id]])
|
||||||
)
|
|
||||||
|
|
||||||
# --- Trigger graphic widgets ---
|
# --- Trigger graphic widgets ---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue