First, the user needs to choise the acoustic file and one frequency. The he can download the fine sediment file and the sand sediment file. For the moment, the two files must have the same number of sample. Concentration and PSD plots are updated with checking sample checkboxes. However, the z/h plot need to be modified.

This commit is contained in:
brahim committed 2024-07-12 11:46:54 +02:00
1 parent 1e4f5c7e7a
commit 250fed45fc
4 files changed
+1349 -687

No files matched your search

+10 -8
View File
@@ -12,18 +12,21 @@ class GranuloLoader:
self._path = path
self._data = pd.read_excel(self._path, engine="odf", header=0)
self._time = np.array(self._data.iloc[:, 0])
self._y = np.array(self._data.iloc[:, 1]) # distance from left bank (m)
self._z = np.array(self._data.iloc[:, 2]) # depth (m)
self._time = self._data.iloc[:, 0].tolist()
self._y = self._data.iloc[:, 1].tolist() # distance from left bank (m)
self._z = self._data.iloc[:, 2].tolist() # depth (m)
self._r_grain = 1e-6*np.array(self._data.columns.values)[5:].astype(float) / 2 # grain radius (m)
self._r_grain = 1e-6 * self._data.columns.values[5:] / 2
# self._r_grain = 1e-6 * np.array(self._data.columns.values)[5:].astype(float) / 2 # grain radius (m)
self._Ctot = np.array(self._data.iloc[:, 3]) # Total concentration (g/L)
self._D50 = np.array(self._data.iloc[:, 4]) # median diameter (um)
self._Ctot = self._data.iloc[:, 3].tolist() # Total concentration (g/L)
self._D50 = self._data.iloc[:, 4].tolist() # median diameter (um)
self._frac_vol = np.array(self._data.iloc[:, 5:]) / 100 # Volume fraction (%)
self._frac_vol_cumul = np.cumsum(self._frac_vol, axis=1) # Cumulated volume fraction (%)
# print(type(self._frac_vol_cumul), self._frac_vol_cumul.shape, self._frac_vol_cumul)
# # --- Load sand sediments data file ---
# self.path_sand = path_sand
# self._data_sand = pd.read_excel(self.path_sand, engine="odf", header=0)
@@ -122,8 +125,7 @@ class GranuloLoader:
# if __name__ == "__main__":
# GranuloLoader("/home/bmoudjed/Documents/3 SSC acoustic meas project/Graphical interface project/Data/Granulo_data/"
# "fine_sample_file.ods")
# GranuloLoader("/home/bmoudjed/Documents/2 Data/Confluence_Rhône_Isere_2018/Granulo_data/fine_sample_file.ods")
# GranuloLoader("/home/bmoudjed/Documents/3 SSC acoustic meas project/Graphical interface project/Data/Granulo_data/"
# "sand_sample_file.ods")
# GranuloLoader("/home/bmoudjed/Documents/3 SSC acoustic meas project/Graphical interface project/Data/"
+4 -1
View File
@@ -1894,7 +1894,7 @@ class AcousticDataTab(QWidget):
stg.rmax.append("")
stg.BS_stream_bed.append(np.array([]))
stg.depth_bottom.append([])
stg.depth_bottom.append(np.array([]))
stg.val_bottom.append([])
stg.ind_bottom.append([])
stg.freq_bottom_detection.append([])
@@ -3971,10 +3971,13 @@ class AcousticDataTab(QWidget):
# np.where(np.round(stg.time, 2) == self.spinbox_tmax.value())[0][0]]
stg.depth_bottom[self.fileListWidget.currentRow()] = r_bottom
print("stg.depth_bottom", stg.depth_bottom)
stg.val_bottom[self.fileListWidget.currentRow()] = val_bottom
print("stg.val_bottom", stg.val_bottom)
stg.ind_bottom[self.fileListWidget.currentRow()] = r_bottom_ind
print("stg.ind_bottom", stg.ind_bottom)
# if ((self.fileListWidget.count() == 1) and (len(stg.depth_bottom) == 0)):
# stg.depth_bottom = [r_bottom]#[int(stg.tmin[self.combobox_freq_choice.currentIndex()]):
+1305 -657
View File
File diff suppressed because it is too large. Load diff
+30 -21
View File
@@ -109,36 +109,45 @@ lin_reg = tuple()
# --- Sample Data ---
samples = []
sample_fine = []
fine_sediment_path = ""
fine_sediment_filename = ""
fine_sediment_columns = []
path_fine = ""
filename_fine = ""
columns_fine = []
sample_distance_from_bank = np.array([]) # distance from left bank (m)
sample_depth = np.array([]) # depth (m)
sample_time = np.array([])
distance_from_bank_fine = [] # distance from left bank (m)
depth_fine = [] # depth (m)
time_fine = []
radius_grain = np.array([]) # grain radius (um)
radius_grain_fine = [] # grain radius (um)
Ctot_fine = np.array([]) # Total concentration (g/L)
D50_fine = np.array([]) # median diameter (um)
frac_vol_fine = np.array([]) # Volume fraction (%)
Ctot_fine = [] # Total concentration (g/L)
D50_fine = [] # median diameter (um)
frac_vol_fine = []
# Volume fraction (%)
frac_vol_fine_cumul = np.array([]) # Cumulated volume fraction (%)
frac_vol_fine_cumul = [] # Cumulated volume fraction (%)
sand_sediment_path = ""
sand_sediment_filename = ""
sand_sediment_columns = []
sample_sand = []
Ctot_sand = np.array([]) # Total concentration (g/L)
D50_sand = np.array([]) # median diameter (um)
frac_vol_sand = np.array([]) # Volume fraction (%)
path_sand = ""
filename_sand = ""
columns_sand = []
frac_vol_sand_cumul = np.array([]) # Cumulated volume fraction (%)
distance_from_bank_sand = [] # distance from left bank (m)
depth_sand = [] # depth (m)
time_sand = []
Ctot_fine_per_cent = np.array([])
Ctot_sand_per_cent = np.array([])
radius_grain_sand = []
Ctot_sand = [] # Total concentration (g/L)
D50_sand = [] # median diameter (um)
frac_vol_sand = [] # Volume fraction (%)
frac_vol_sand_cumul = [] # Cumulated volume fraction (%)
Ctot_fine_per_cent = []
Ctot_sand_per_cent = []
# --- Acoustic inversion method ---