The acoustic data tab has been updated, and the variables in the settings python file have been modified: all are python lists, allowing you to work with multiple acoustic data. Each list are filled with object with as many object as there are acoutic data. 1/ File list widget is added to add/clear/delete buttons. Measurement information is displayed in a scrolling text box. Table of backscatter values is added. Limits of dataset in display option box are displayed with double slider. Limits of dataset are displayed in Display options box with double sliders. Double sliders are also used for river bottom detection.
parent
bfdbd74720
commit
75eeac0310
|
|
@ -687,7 +687,7 @@ class RawAquascatData:
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
|
|
||||||
# Allocate Memory for the Data
|
# Allocate Memory for the Data
|
||||||
AuxData = np.zeros((AuxNumSamples, NumAuxChans))
|
AuxData = np.zeros((int(AuxNumSamples), NumAuxChans))
|
||||||
AbsData = np.zeros((int(AbsNumBins[0]), int(AbsNumProfiles[0]),
|
AbsData = np.zeros((int(AbsNumBins[0]), int(AbsNumProfiles[0]),
|
||||||
int(NumAbsTimeSlots)), dtype=float, order='C')
|
int(NumAbsTimeSlots)), dtype=float, order='C')
|
||||||
PressTempData = np.zeros((NumSerialSamples, 2))
|
PressTempData = np.zeros((NumSerialSamples, 2))
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,19 @@ class TableModel(QAbstractTableModel):
|
||||||
# value = self._data.iloc[index.row(), index.column()]
|
# value = self._data.iloc[index.row(), index.column()]
|
||||||
# if isinstance(value, int) or isinstance(value, float):
|
# if isinstance(value, int) or isinstance(value, float):
|
||||||
# return Qt.AlignVCenter + Qt.AlignRight
|
# return Qt.AlignVCenter + Qt.AlignRight
|
||||||
return str(value)
|
|
||||||
# if isinstance(value, float):
|
if isinstance(value, float):
|
||||||
# # Render float to 2 dp
|
# Render float to 2 dp
|
||||||
# return "%.2f" % value
|
if len(str(value).split(".")[1]) <= 3:
|
||||||
|
return "%.2f" % value
|
||||||
|
else:
|
||||||
|
return "%.2e" % value
|
||||||
# if isinstance(value, str):
|
# if isinstance(value, str):
|
||||||
# # Render strings with quotes
|
# # Render strings with quotes
|
||||||
# return '"%s"' % value
|
# return '"%s"' % value
|
||||||
|
|
||||||
|
return value
|
||||||
|
|
||||||
def rowCount(self, index):
|
def rowCount(self, index):
|
||||||
# The length of the outer list.
|
# The length of the outer list.
|
||||||
return self._data.shape[0]
|
return self._data.shape[0]
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ class AcousticDataLoader:
|
||||||
# self.reshape_t()
|
# self.reshape_t()
|
||||||
# self.compute_r_2D()
|
# self.compute_r_2D()
|
||||||
|
|
||||||
def reshape_BS_raw_cross_section(self):
|
def reshape_BS_raw_data(self):
|
||||||
BS_raw_cross_section = np.reshape(self._BS_raw_data,
|
BS_raw_cross_section = np.reshape(self._BS_raw_data,
|
||||||
(self._r.shape[1] * self._time.shape[1], self._freq.shape[0]),
|
(self._r.shape[1] * self._time.shape[1], self._freq.shape[0]),
|
||||||
order="F")
|
order="F")
|
||||||
|
|
@ -114,7 +114,7 @@ class AcousticDataLoader:
|
||||||
print(r2D.shape)
|
print(r2D.shape)
|
||||||
return r2D
|
return r2D
|
||||||
|
|
||||||
def reshape_t(self):
|
def reshape_time(self):
|
||||||
# t = np.reshape(np.repeat(self._time, self._r.shape[0]), (self._time.shape[0]*self._r.shape[0], 1))
|
# t = np.reshape(np.repeat(self._time, self._r.shape[0]), (self._time.shape[0]*self._r.shape[0], 1))
|
||||||
t = np.zeros((self._r.shape[1] * self._time.shape[1], self._freq.shape[0]))
|
t = np.zeros((self._r.shape[1] * self._time.shape[1], self._freq.shape[0]))
|
||||||
for i, _ in enumerate(self._freq):
|
for i, _ in enumerate(self._freq):
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
16
main.py
16
main.py
|
|
@ -8,6 +8,7 @@ from View.mainwindow import Ui_MainWindow
|
||||||
from View.acoustic_data_tab import AcousticDataTab
|
from View.acoustic_data_tab import AcousticDataTab
|
||||||
from View.signal_processing_tab import SignalProcessingTab
|
from View.signal_processing_tab import SignalProcessingTab
|
||||||
from View.sample_data_tab import SampleDataTab
|
from View.sample_data_tab import SampleDataTab
|
||||||
|
from View.sediment_calibration_tab import SedimentCalibrationTab
|
||||||
from View.acoustic_inversion_tab import AcousticInversionTab
|
from View.acoustic_inversion_tab import AcousticInversionTab
|
||||||
from View.note_tab import NoteTab
|
from View.note_tab import NoteTab
|
||||||
from View.user_manual_tab import UserManualTab
|
from View.user_manual_tab import UserManualTab
|
||||||
|
|
@ -18,6 +19,8 @@ import matplotlib.pyplot as plt
|
||||||
# Check encoding used
|
# Check encoding used
|
||||||
# print(sys.getdefaultencoding())
|
# print(sys.getdefaultencoding())
|
||||||
|
|
||||||
|
# python3 -m PyQt5.uic.pyuic -x QScrollbar.ui -o QScrollbar.py
|
||||||
|
|
||||||
PERCENT_SCREEN_SIZE = 0.85
|
PERCENT_SCREEN_SIZE = 0.85
|
||||||
_translate = QCoreApplication.translate
|
_translate = QCoreApplication.translate
|
||||||
|
|
||||||
|
|
@ -45,7 +48,7 @@ class MainApplication(QMainWindow):
|
||||||
# Connect push buttons to download data files22
|
# Connect push buttons to download data files22
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# --------- Signal processing data tab ----------
|
# --------- Signal pre-processing data tab ----------
|
||||||
|
|
||||||
self.signal_processing_tab = SignalProcessingTab(self.ui_mainwindow.tab2)
|
self.signal_processing_tab = SignalProcessingTab(self.ui_mainwindow.tab2)
|
||||||
|
|
||||||
|
|
@ -54,20 +57,25 @@ class MainApplication(QMainWindow):
|
||||||
|
|
||||||
self.sample_data_tab = SampleDataTab(self.ui_mainwindow.tab3)
|
self.sample_data_tab = SampleDataTab(self.ui_mainwindow.tab3)
|
||||||
|
|
||||||
|
# **************************************************
|
||||||
|
# ------------ Sediment calibration tab -------------
|
||||||
|
|
||||||
|
self.sediment_calibration_tab = SedimentCalibrationTab(self.ui_mainwindow.tab4)
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# ------------ Acoustic inversion tab -------------
|
# ------------ Acoustic inversion tab -------------
|
||||||
|
|
||||||
self.acoustic_inversion_tab = AcousticInversionTab(self.ui_mainwindow.tab4)
|
self.acoustic_inversion_tab = AcousticInversionTab(self.ui_mainwindow.tab5)
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# ------------------- Note tab --------------------
|
# ------------------- Note tab --------------------
|
||||||
|
|
||||||
self.note_tab = NoteTab(self.ui_mainwindow.tab5)
|
self.note_tab = NoteTab(self.ui_mainwindow.tab6)
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# ---------------- User Manual tab -----------------
|
# ---------------- User Manual tab -----------------
|
||||||
|
|
||||||
self.user_manual_tab = UserManualTab(self.ui_mainwindow.tab6)
|
self.user_manual_tab = UserManualTab(self.ui_mainwindow.tab7)
|
||||||
|
|
||||||
# **************************************************
|
# **************************************************
|
||||||
# ---------------- Text File Error -----------------
|
# ---------------- Text File Error -----------------
|
||||||
|
|
|
||||||
65
settings.py
65
settings.py
|
|
@ -6,16 +6,16 @@ import datetime
|
||||||
|
|
||||||
# --- load raw data ---
|
# --- load raw data ---
|
||||||
|
|
||||||
ABS_name = ""
|
ABS_name = []
|
||||||
|
|
||||||
path_BS_raw_data = ""
|
path_BS_raw_data = []
|
||||||
filename_BS_raw_data = ""
|
filename_BS_raw_data = []
|
||||||
BS_raw_data = np.array([]) # BS raw data : all measurement (go and back)
|
BS_raw_data = [] # BS raw data : all measurement (go and back)
|
||||||
r = np.array([])
|
depth = []
|
||||||
r_2D = np.array([])
|
r_2D = []
|
||||||
freq = np.array([])
|
freq = []
|
||||||
freq_text = list()
|
freq_text = []
|
||||||
time = np.array([])
|
time = []
|
||||||
|
|
||||||
path_BS_noise_data = ""
|
path_BS_noise_data = ""
|
||||||
filename_BS_noise_data = ""
|
filename_BS_noise_data = ""
|
||||||
|
|
@ -26,45 +26,48 @@ date = []
|
||||||
date_noise = []
|
date_noise = []
|
||||||
hour = []
|
hour = []
|
||||||
hour_noise = []
|
hour_noise = []
|
||||||
nb_profiles = 0
|
nb_profiles = []
|
||||||
nb_profiles_per_sec = 0.0
|
nb_profiles_per_sec = []
|
||||||
nb_cells = 0
|
nb_cells = []
|
||||||
cell_size = 0.0
|
cell_size = []
|
||||||
pulse_length = 0.0
|
pulse_length = []
|
||||||
nb_pings_per_sec = 0
|
nb_pings_per_sec = []
|
||||||
nb_pings_averaged_per_profile = 0.0
|
nb_pings_averaged_per_profile = []
|
||||||
kt = np.array([])
|
kt = []
|
||||||
gain_rx = np.array([])
|
gain_rx = []
|
||||||
gain_tx = np.array([])
|
gain_tx = []
|
||||||
|
|
||||||
SNR_data = np.array([]) # SNR is computed with BS_noise_averaged_data
|
SNR_data = np.array([]) # SNR is computed with BS_noise_averaged_data
|
||||||
time_snr = np.array([])
|
time_snr = np.array([])
|
||||||
|
|
||||||
# --- reshape raw data for table of values in Acoustic Data tab ---
|
# --- reshape raw data for table of values in Acoustic Data tab ---
|
||||||
time_reshape = np.array([])
|
time_reshape = []
|
||||||
time_snr_reshape = np.array([])
|
time_snr_reshape = np.array([])
|
||||||
r_reshape = np.array([])
|
r_reshape = []
|
||||||
BS_raw_data_reshape = np.array([])
|
BS_raw_data_reshape = []
|
||||||
SNR_reshape = np.array([]) # snr is reshape to be included in table of values in acoustic data tab
|
SNR_reshape = np.array([]) # snr is reshape to be included in table of values in acoustic data tab
|
||||||
DataFrame_acoustic = pd.DataFrame()
|
DataFrame_acoustic = pd.DataFrame()
|
||||||
|
|
||||||
# --- Processed data in Acoustic Data Tab and used in Acoustic processing tab ---
|
# --- Processed data in Acoustic Data Tab and used in Acoustic processing tab ---
|
||||||
tmin = np.array([]) # minimum boundary of time (spin box tmin)
|
tmin = [] # minimum boundary of time (spin box tmin)
|
||||||
tmin_snr = np.array([])
|
tmin_snr = np.array([])
|
||||||
tmax = np.array([]) # maximum boundary of time (spin box tmin)
|
tmax = [] # maximum boundary of time (spin box tmin)
|
||||||
tmax_snr = np.array([])
|
tmax_snr = np.array([])
|
||||||
BS_cross_section = np.array([]) # BS data limited with tmin and tmax values of spin box
|
rmin = []
|
||||||
|
rmax = []
|
||||||
|
BS_cross_section = [] # BS data limited with tmin and tmax values of spin box
|
||||||
# BS_data = stg.BS_raw_data[f, :, int(stg.tmin[f]):int(stg.tmax[f])]
|
# BS_data = stg.BS_raw_data[f, :, int(stg.tmin[f]):int(stg.tmax[f])]
|
||||||
BS_stream_bed = np.array([]) # BS_data_section = BS data in the section. Values NaN outside the bottom of the section are deleted
|
BS_stream_bed = [] # BS_data_section = BS data in the section. Values NaN outside the bottom of the section are deleted
|
||||||
BS_noise_cross_section = np.array([]) # BS_noise_cros_section = BS_noise_data[:, :, tmin:tmax] (former Noise_data)
|
BS_noise_cross_section = np.array([]) # BS_noise_cros_section = BS_noise_data[:, :, tmin:tmax] (former Noise_data)
|
||||||
SNR_cross_section = np.array([]) # SNR_data = snr[:, :, tmin:tmax]
|
SNR_cross_section = np.array([]) # SNR_data = snr[:, :, tmin:tmax]
|
||||||
SNR_stream_bed = np.array([])
|
SNR_stream_bed = np.array([])
|
||||||
t = np.array([])
|
t_cross_section = []
|
||||||
t_snr = np.array([])
|
t_snr = np.array([])
|
||||||
r_bottom = np.array([])
|
depth_cross_section = []
|
||||||
val_bottom = np.array([])
|
depth_bottom = []
|
||||||
ind_bottom = np.array([])
|
val_bottom = []
|
||||||
freq_bottom_detection = 0
|
ind_bottom = []
|
||||||
|
freq_bottom_detection = []
|
||||||
|
|
||||||
# --- Processed data in Signal Processing Tab ---
|
# --- Processed data in Signal Processing Tab ---
|
||||||
# BS_cross_section_SNR_filter = np.array([[[]]]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is not detected
|
# BS_cross_section_SNR_filter = np.array([[[]]]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is not detected
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue