mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-30 03:10:40 +01:00
UBSediFlow data successfully loaded
This commit is contained in:
1 parent
7d359983f0
commit
b01b4541bb
2 files changed
+179
-47
No files matched your search
@@ -703,18 +703,23 @@ class AcousticDataTab(QWidget):
|
||||
filename = QFileDialog.getOpenFileName(self, "Open file", "", "UBSediFlow file (*.udt)")
|
||||
dir_name = path.dirname(filename[0])
|
||||
name = path.basename(filename[0])
|
||||
print(dir_name, name)
|
||||
|
||||
|
||||
# --- Fill lineEdit with path and file names + load acoustic data ---
|
||||
# --- fill date, hour and measurements information + fill frequency combobox for bottom detection ---
|
||||
if self.combobox_ABS_system_choice.currentIndex() != 0:
|
||||
if self.sender().objectName() == "pushbutton_acoustic_file":
|
||||
# stg.path_BS_raw_data = dir_name
|
||||
# stg.filename_BS_raw_data = name
|
||||
# self.load_BS_acoustic_raw_data()
|
||||
try:
|
||||
stg.path_BS_raw_data = dir_name
|
||||
stg.filename_BS_raw_data = name
|
||||
self.load_BS_acoustic_raw_data()
|
||||
print("0 Je suis sur la donnée BS")
|
||||
except ValueError as e:
|
||||
print("error : ", e)
|
||||
print("1 Je suis sur la donnée BS")
|
||||
msgBox = QMessageBox()
|
||||
msgBox.setWindowTitle("Download Error")
|
||||
@@ -793,7 +798,7 @@ class AcousticDataTab(QWidget):
|
||||
stg.r_reshape = acoustic_data.reshape_r()
|
||||
stg.time_reshape = acoustic_data.reshape_t()
|
||||
stg.snr = acoustic_data._SNR_data
|
||||
stg.snr_reshape = acoustic_data.reshape_SNR_data()
|
||||
# stg.snr_reshape = acoustic_data.reshape_SNR_data()
|
||||
|
||||
def load_noise_data_and_compute_SNR(self):
|
||||
if self.combobox_ABS_system_choice.currentIndex() == 1:
|
||||
@@ -990,8 +995,8 @@ class AcousticDataTab(QWidget):
|
||||
|
||||
pcm = self.axis_BS[f].pcolormesh(
|
||||
stg.time[f, int(stg.tmin[f]):int(stg.tmax[f])], -stg.r[f, :],
|
||||
stg.BS_raw_data[f, :, int(stg.tmin[f]):int(stg.tmax[f])],
|
||||
cmap='viridis', norm=LogNorm(vmin=val_min, vmax=val_max))
|
||||
np.log(stg.BS_raw_data[f, :, int(stg.tmin[f]):int(stg.tmax[f])]),
|
||||
cmap='Blues')#, norm=LogNorm(vmin=val_min, vmax=val_max))
|
||||
|
||||
self.axis_BS[f].text(1, .70, stg.freq_text[f],
|
||||
fontsize=14, fontweight='bold', fontname="Ubuntu", c="black", alpha=0.5,
|
||||
@@ -1065,8 +1070,8 @@ class AcousticDataTab(QWidget):
|
||||
|
||||
# print("stg.t[f, :].shape ", stg.t[f])
|
||||
# print("stg.r[f, :].shape ", stg.r[f, :])
|
||||
pcm = self.axis_BS[f].pcolormesh(stg.t[f, :], -stg.r[f, :], stg.BS_data[f, :, :],
|
||||
cmap='viridis', norm=LogNorm(vmin=val_min, vmax=val_max))
|
||||
pcm = self.axis_BS[f].pcolormesh(stg.t[f, :], -stg.r[f, :], np.log(stg.BS_data[f, :, :]),
|
||||
cmap='Blues')#, norm=LogNorm(vmin=val_min, vmax=val_max))
|
||||
|
||||
self.axis_BS[f].text(1, .70, stg.freq_text[f],
|
||||
fontsize=14, fontweight='bold', fontname="Ubuntu", c="black", alpha=0.5,
|
||||
|
||||
Reference in new issue
Block a user