Setting parameters are detailed.

dev-brahim
brahim 2024-11-15 12:22:29 +01:00
parent e5422941e1
commit ddcfd4b6c4
1 changed files with 99 additions and 116 deletions

View File

@ -4,7 +4,15 @@ import numpy as np
import pandas as pd
import datetime
# --- Save study ---
acoustic_data = [] # Acoustic data number # List of integer
dirname_save_as = "" # Path to save a study # String
filename_save_as = "" # File name to save a study # String
# --- load raw data ---
dirname_open = "" # Path to open a study # String
filename_open = "" # File name to open a study # String
# =========================================================
# --- ACOUSTIC DATA TAB ---
@ -13,8 +21,8 @@ import datetime
# Variables names # Description # Type
ABS_name = [] # Acoustic Backscatter System name : ["Aquascat 1000R", "UB-SediFlow"] # List of strings
temperature = 0 # Temperature of measurements (One temperature for all measurements) # Float
water_velocity = 0 # Speed of sound in water (One speed of sound for all measurements) # Float
temperature = 0.00 # Temperature of measurements (One temperature for all measurements) # Float
water_velocity = 0.00 # Speed of sound in water (One speed of sound for all measurements) # Float
# --- Acoustic raw data ---
path_BS_raw_data = [] # Paths of the acoustic data files # List of strings
@ -76,9 +84,9 @@ val_bottom = [] # Level of the BS signal on the bottom : 1D arra
ind_bottom = [] # Index of bottom in depth array : list of int # List of lists
freq_bottom_detection = [] # Frequency use to detect the bottom : (index, string) # List of tuple
dept_bottom_detection_min = [] # Min value to detect bottom on the first vertical # List of float
depth_bottom_detection_max = [] # Max value to detect bottom on the first vertical # List of float
depth_bottom_detection_1st_int_area = [] # interval for searching area # List of float
# depth_bottom_detection_min = [] # Min value to detect bottom on the first vertical # List of float
# depth_bottom_detection_max = [] # Max value to detect bottom on the first vertical # List of float
# depth_bottom_detection_1st_int_area = [] # interval for searching area # List of float
# ----------------------------------------------------------------------------------------------------------------------
# =========================================================
@ -87,51 +95,46 @@ depth_bottom_detection_1st_int_area = [] # interval for searching area
# Variables names # Description # Type
path_BS_noise_data = []
filename_BS_noise_data = []
BS_noise_raw_data = [] # BS noise raw data : BS signal listen
BS_noise_averaged_data = [] # BS noise raw data averaged (array has the same shape than BS_raw_data shape)
path_BS_noise_data = [] # Paths of the acoustic noise data files # List of strings
filename_BS_noise_data = [] # Files names of the acoustic noise data files # List of strings
BS_mean = []
noise_method = [] # = 0 if noise is computed from a file # List of integer
# = 1 if noise is computed from profile tail (value)
date_noise = []
hour_noise = []
noise_value = [] # Constant value get from profile tail # List of float
noise_method = []
noise_value = []
SNR_filter_value = []
Nb_cells_to_average_BS_signal = []
data_preprocessed = []
BS_noise_raw_data = [] # Acoustic noise raw data measurements : 3D arrays # List of arrays
# If a noise file is downloaded, shape is (freq x depth_noise x time_noise)
# If noise is computed with value from profile tail, shape is the same than BS_raw_data or BS_cross_section or BS_stream_bed
time_noise = [] # Time of noise data read from the noise file
depth_noise = [] # Depth of noise data read from the noise file
BS_noise_averaged_data = [] # BS_noise_raw_data is averaged and fit the shape of # List of arrays
# BS_raw_data or BS_cross_section or BS_stream_bed
time_snr_reshape = np.array([])
SNR_reshape = np.array([]) # snr is reshape to be included in table of values in acoustic data tab
BS_mean = [] # Average BS_raw_data or BS_cross_section or BS_stream_bed # List of arrays
# to plot profile tail : 1D arrays
SNR_raw_data = [] # SNR is computed with BS_noise_averaged_data
time_noise = []
depth_noise = []
SNR_filter_value = [] # Signal to Noise Ratio value use to delete point on BS signal # List of float
Nb_cells_to_average_BS_signal = [] # Nb of cells used to average the BS signal # List of float
tmin_snr = np.array([])
tmax_snr = np.array([])
data_preprocessed = [] # New name of preprocessed data # List of string
# BS_noise_cross_section = [] # BS_noise_cross_section = BS_noise_data[:, :, tmin:tmax] (former Noise_data)
SNR_cross_section = [] # SNR_data = snr[:, :, tmin:tmax]
SNR_stream_bed = []
time_snr = []
time_average = np.array([])
SNR_data_average = np.array([]) # SNR data computed with BS signal averaged (not with BS raw signal)
SNR_raw_data = [] # SNR from BS_raw_data and BS_noise_averaged_data : 3D array # List of arrays
SNR_cross_section = [] # SNR from BS_cross_section and BS_noise_averaged_data : 3D array # List of arrays
SNR_stream_bed = [] # SNR from BS_stream_bed and BS_noise_averaged_data : 3D array # List of arrays
# --- Processed data in Signal Processing Tab ---
BS_raw_data_pre_process_SNR = []
BS_raw_data_pre_process_average = []
BS_raw_data_pre_process_SNR_average = []
BS_raw_data_pre_process_SNR = [] # BS_raw_data preprocessed with SNR_filter_value # List of arrays
# (remove point if SNR < SNR_filter_value) : 3D array
BS_raw_data_pre_process_average = [] # BS_raw_data average with Nb_cells_to_average_BS_signal : 3D arrays # List of arrays
BS_cross_section_pre_process_SNR = [] # BS data filtered with SNR values (remove point if SNR < value) - bottom is not detected
BS_cross_section_pre_process_average = [] # BS data averaged - bottom is not detected
BS_cross_section_pre_process_SNR_average = [] # BS data averaged and filtered with SNR - bottom is not detected
BS_cross_section_pre_process_SNR = [] # BS_cross_section preprocessed with SNR_filter_value # List of arrays
# (remove point if SNR < SNR_filter_value) : 3D array
BS_cross_section_pre_process_average = [] # BS_cross_section averaged with Nb_cells_to_average_BS_signal : 3D arrays # List of arrays
BS_stream_bed_pre_process_SNR = [] # BS data filtered with SNR values (remove point if SNR < value) - bottom is detected
BS_stream_bed_pre_process_average = [] # BS data averaged - bottom is detected
BS_stream_bed_pre_process_SNR_average = [] # BS data averaged and filtered with SNR - bottom is detected
BS_stream_bed_pre_process_SNR = [] # BS_cross_section preprocessed with SNR_filter_value # List of arrays
# (remove point if SNR < SNR_filter_value) : 3D array
BS_stream_bed_pre_process_average = [] # BS_cross_section averaged with Nb_cells_to_average_BS_signal : 3D arrays # List of arrays
# ----------------------------------------------------------------------------------------------------------------------
# =========================================================
@ -142,57 +145,42 @@ BS_stream_bed_pre_process_SNR_average = [] # BS data averaged and
# --- Fine sediment Data ---
path_fine = "" # Path of the fine sediments data files # string
filename_fine = "" # File name of the fine sediments data # string
columns_fine = [] # Column names of the fine sediments data # Index list
sample_fine = [] # Fine sediments sample [('Fn', n-1)] # List of tuples
distance_from_bank_fine = [] # Distance from bank (m) of the fine sediments # List of float
depth_fine = [] # Depth (m) of the fine sediments # List of float
time_fine = [] # Collection time (sec) of the fine sediments # List of float
radius_grain_fine = [] # Grain radius (m) of the fine sediments # 1D Array
Ctot_fine = [] # Total concentration (g/L) of the fine sediments # List of float
Ctot_fine_per_cent = [] # Total concentration (%) of the fine sediments # List of float
D50_fine = [] # D50 diameter (um) of the fine sediments # List of float
frac_vol_fine = [] # Volume fraction of the fine sediments # 2D Array
frac_vol_fine_cumul = [] # Cumulated volume fraction (%) of the fine sediments # 2D Array
# --- Sand sediment Data ---
sample_fine = []
path_sand = "" # Path of the sand sediments data files # string
filename_sand = "" # File name of the sand sediments data # string
columns_sand = [] # Column names of the sand sediments data # Index list
path_fine = ""
filename_fine = ""
columns_fine = []
sample_sand = [] # Sand sediments sample [('Sn', n-1)] # List of tuples
distance_from_bank_fine = [] # distance from left bank (m)
depth_fine = [] # depth (m)
time_fine = []
distance_from_bank_sand = [] # Distance from bank (m) of the sand sediments # List of float
depth_sand = [] # Depth (m) of the sand sediments # List of float
time_sand = [] # Collection time (sec) of the sand sediments # List of float
radius_grain_fine = [] # grain radius (um)
radius_grain_sand = [] # Grain radius (m) of the sand sediments # 1D Array
Ctot_sand = [] # Total concentration (g/L) of the sand sediments # List of float
Ctot_sand_per_cent = [] # Total concentration (%) of the sand sediments # List of float
D50_sand = [] # D50 diameter (um) of the sand sediments # List of float
frac_vol_sand = [] # Volume fraction of the sand sediments # 2D Array
frac_vol_sand_cumul = [] # Cumulated volume fraction (%) of the sand sediments # 2D Array
Ctot_fine = [] # Total concentration (g/L)
D50_fine = [] # median diameter (um)
frac_vol_fine = []
# Volume fraction (%)
frac_vol_fine_cumul = [] # Cumulated volume fraction (%)
fine_sample_profile = [] # Fine sample choose for the profile in calibration
sample_sand = []
path_sand = ""
filename_sand = ""
columns_sand = []
distance_from_bank_sand = [] # distance from left bank (m)
depth_sand = [] # depth (m)
time_sand = []
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 (%)
sand_sample_target = [] # Sand sample target for calibration
sand_sample_target_indice = []
Ctot_fine_per_cent = []
Ctot_sand_per_cent = []
fine_sample_position = [] # [('F6', 5), ('F7', 6), ('F8', 7)] [('Fn', n-1)]
sand_sample_position = []
# ----------------------------------------------------------------------------------------------------------------------
@ -202,30 +190,37 @@ sand_sample_position = []
# Variables names # Description # Type
sediment_attenuation = []
FCB = []
depth_real = []
lin_reg = []
# --- Parameters choice for calibration ---
# --- Sediment Calibration
frequencies_for_calibration = []
frequencies_for_calibration = [] # Frequencies chosen for calibration [(f1_val, f1_ind), (f2_val, f2_ind)] # List of 2 tuples
frequency_for_inversion = tuple() # Frequency chosen for inversion (finv_val, finv_ind) # Tuple
range_lin_interp = []
M_profile_fine = []
fine_sample_profile = [] # Fine samples choose for the profile in calibration [('Fn', n-1)] # List of tuples
path_calibration_file = ""
filename_calibration_file = ""
sand_sample_target = [] # Sand sample target for calibration [('Sn', n-1)] # List of 1 tuple
sand_sample_target_indice = [] # position index (time, depth) of the Sand sample target for # List of 2 tuples
# each calibration frequency
# [(time_index_freq1, depth_index_freq1), (time_index_freq2, depth_index_freq2)]
ks = []
sv = []
X_exponent = []
alpha_s = []
zeta = []
# --- Calibration computation ---
J_cross_section = []
range_lin_interp = np.array([]) # Point of the depth use to interpolate the fine sediment profile # 1D array
M_profile_fine = np.array([]) # Interpolate concentration of fine sediments # 1D array
frequency_for_inversion = tuple()
path_calibration_file = "" # Path of the calibration file # string
filename_calibration_file = "" # File name of the calibration file # string
ks = [] # List [ks_freq1, ks_freq2] # List of floats
sv = [] # List [sv_freq1, sv_freq2] # List of floats
X_exponent = [] # List of one value [X_exponent] # List of one float
alpha_s = [] # List [alphas_freq1, alphas_freq2] # List of floats
zeta = [] # List [zeta_freq1, zeta_freq2] # List of floats
J_cross_section = [] # List of J_cross_section compute for all acoustic data recording # List of lists of 3D arrays
# [[J_cross_section_freq1, J_cross_section_freq2], [], []]
FCB = [] # 3D array
depth_real = [] # 3D array
lin_reg = [] # (lin_reg_compute.slope, lin_reg_compute.intercept) # Tuple
# ----------------------------------------------------------------------------------------------------------------------
# =========================================================
@ -234,23 +229,11 @@ frequency_for_inversion = tuple()
# Variables names # Description # Type
frequencies_to_compute_VBI = np.array([])
VBI_cross_section = []
# VBI_stream_bed = np.array([[[]]])
SSC_fine = []
SSC_sand = []
# --- Save study ---
acoustic_data = []
dirname_save_as = ""
filename_save_as = ""
dirname_open = ""
filename_open = ""
read_table_trigger = 0
VBI_cross_section = [] # Volume Backscattering Index # List of 2D array
fine_sample_position = [] # Fine samples indexes position for time and depth [(time_index, depth_index)] # List of tuples
sand_sample_position = [] # Sand samples indexes position for time and depth [(time_index, depth_index)] # List of tuples
SSC_fine = [] # Suspended Sediment Concentration of the fine sediments # List of one 3D array
SSC_sand = [] # Suspended Sediment Concentration of the sand sediments # List of one 3D array