Sample data tab is updated with global variables in settings python file. Profiles position and samples position plotted on transect are added in, respectively, signal processing tab and sample data tab.

This commit is contained in:
brahim committed 2023-08-24 10:11:16 +02:00
1 parent 6bcd0caa35
commit 1b8945025c
9 files changed
+1002 -223

No files matched your search

+3
View File
@@ -48,6 +48,9 @@ class AcousticDataLoader():
# print(["BS - " + f for f in self._freq_text])
# print(self._time.shape[0]*self._r.shape[0]*4)
# print(self._time[np.where(np.floor(self._time) == 175)])
# print(np.where((self._time) == 155)[0][0])
# fig, ax = plt.subplots(nrows=1, ncols=1)
# ax.pcolormesh(self._time, self._r, (self._BS_raw_data[:, 1, :]),
# cmap='viridis',
+27 -25
View File
@@ -6,41 +6,43 @@ class GranuloLoader:
""" This class allows to load granulo data file """
def __init__(self, path_fine: str, path_sand: str):
def __init__(self, path: str):
# --- Load fine sediments data file ---
self.path_fine = path_fine
self._data_fine = pd.read_excel(self.path_fine, engine="odf", header=0)
self._path = path
self._data = pd.read_excel(self._path, engine="odf", header=0)
self._y = np.array(self._data_fine.iloc[:, 0]) # distance from left bank (m)
self._z = np.array(self._data_fine.iloc[:, 1]) # depth (m)
self._r_grain = np.array(self._data_fine.columns.values)[4:] # grain radius (um)
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._Ctot_fine = np.array(self._data_fine.iloc[:, 2]) # Total concentration (g/L)
self._D50_fine = np.array(self._data_fine.iloc[:, 3]) # median diameter (um)
self._frac_vol_fine = np.array(self._data_fine.iloc[:, 4:]) # Volume fraction (%)
self._r_grain = np.array(self._data.columns.values)[5:] # grain radius (um)
self._frac_vol_fine_cumul = np.cumsum(self._frac_vol_fine, axis=1) # Cumulated volume fraction (%)
self._Ctot = np.array(self._data.iloc[:, 3]) # Total concentration (g/L)
self._D50 = np.array(self._data.iloc[:, 4]) # median diameter (um)
self._frac_vol = np.array(self._data.iloc[:, 5:]) # Volume fraction (%)
# --- Load sand sediments data file ---
self.path_sand = path_sand
self._data_sand = pd.read_excel(self.path_sand, engine="odf", header=0)
self._frac_vol_cumul = np.cumsum(self._frac_vol, axis=1) # Cumulated volume fraction (%)
self._Ctot_sand = np.array(self._data_sand.iloc[:, 2]) # Total concentration (g/L)
self._D50_sand = np.array(self._data_sand.iloc[:, 3]) # median diameter (um)
self._frac_vol_sand = np.array(self._data_sand.iloc[:, 4:]) # Volume fraction (%)
self._frac_vol_sand_cumul = np.cumsum(self._frac_vol_sand, axis=1) # Cumulated volume fraction (%)
# --- Compute % of fine and % of sand sediment in total concentration ---
self._Ctot_fine_per_cent = 100 * self._Ctot_fine / (self._Ctot_fine + self._Ctot_sand)
self._Ctot_sand_per_cent = 100 * self._Ctot_sand / (self._Ctot_fine + self._Ctot_sand)
# # --- Load sand sediments data file ---
# self.path_sand = path_sand
# self._data_sand = pd.read_excel(self.path_sand, engine="odf", header=0)
#
# self._Ctot_sand = np.array(self._data_sand.iloc[:, 2]) # Total concentration (g/L)
# self._D50_sand = np.array(self._data_sand.iloc[:, 3]) # median diameter (um)
# self._frac_vol_sand = np.array(self._data_sand.iloc[:, 4:]) # Volume fraction (%)
#
# self._frac_vol_sand_cumul = np.cumsum(self._frac_vol_sand, axis=1) # Cumulated volume fraction (%)
#
# # --- Compute % of fine and % of sand sediment in total concentration ---
#
# self._Ctot_fine_per_cent = 100 * self._Ctot_fine / (self._Ctot_fine + self._Ctot_sand)
# self._Ctot_sand_per_cent = 100 * self._Ctot_sand / (self._Ctot_fine + self._Ctot_sand)
# print(self._time)
# if __name__ == "__main__":
# GranuloLoader("/home/bmoudjed/Documents/3 SSC acoustic meas project/Graphical interface project/Data/Granulo_data/"
# "fine_sample_file.ods",
# "fine_sample_file.ods")
# "/home/bmoudjed/Documents/3 SSC acoustic meas project/Graphical interface project/Data/Granulo_data/"
# "sand_sample_file.ods")