mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-30 03:10:40 +01:00
Distance from ABS to free surface is added so that depth represents distance to the free surace in plots and not distance from transducers.
This commit is contained in:
1 parent
5b012d0265
commit
5eec52bda9
2 files changed
+400
-551
No files matched your search
+284
-480
File diff suppressed because it is too large.
Load diff
+116
-71
@@ -6,87 +6,119 @@ import datetime
|
|||||||
|
|
||||||
# --- load raw data ---
|
# --- load raw data ---
|
||||||
|
|
||||||
ABS_name = []
|
# =========================================================
|
||||||
|
# --- ACOUSTIC DATA TAB ---
|
||||||
|
# =========================================================
|
||||||
|
|
||||||
path_BS_raw_data = []
|
# Variables names # Description # Type
|
||||||
filename_BS_raw_data = []
|
|
||||||
BS_raw_data = [] # BS raw data : all measurement (go and back)
|
ABS_name = [] # Acoustic Backscatter System name : ["Aquascat 1000R", "UB-SediFlow"] # List of strings
|
||||||
depth = []
|
temperature = 0 # Temperature of measurements (One temperature for all measurements) # Float
|
||||||
depth_2D = []
|
water_velocity = 0 # Speed of sound in water (One speed of sound for all measurements) # Float
|
||||||
freq = []
|
|
||||||
freq_text = []
|
# --- Acoustic raw data ---
|
||||||
time = []
|
path_BS_raw_data = [] # Paths of the acoustic data files # List of strings
|
||||||
|
filename_BS_raw_data = [] # Files names of the acoustic data files # List of strings
|
||||||
|
|
||||||
|
BS_raw_data = [] # Acoustic raw data measurements : 3D arrays (freq x depth x time) # List of arrays
|
||||||
|
BS_raw_data_reshape = [] # Acoustic raw data measurements : 2D arrays (freq x (depth x time)) # List of arrays
|
||||||
|
|
||||||
|
depth = [] # Distance from transducer : 2D array (freq x depth) # List of arrays
|
||||||
|
depth_reshape = [] # Distance from transducer : 2D array (freq x (depth x time)) # List of arrays
|
||||||
|
depth_2D = [] # Distance from transducer : 2D array (freq x depth) # List of arrays
|
||||||
|
|
||||||
|
time = [] # Time of measurements : 2D array (freq x time) # List of arrays
|
||||||
|
time_reshape = [] # Time of measurements : 2D array (freq x (depth x time)) # List of arrays
|
||||||
|
|
||||||
|
# --- Measurement information ---
|
||||||
|
date = [] # Date of measurements # List of dates
|
||||||
|
hour = [] # Time of measurements # List of time
|
||||||
|
|
||||||
|
distance_from_ABS_to_free_surface = [] # Set distance from ABS to free surface # List of floats
|
||||||
|
|
||||||
|
freq = [] # Frequency of measurements : 1D array # List of arrays
|
||||||
|
freq_text = [] # Frequency of measurements : list of string # List of lists
|
||||||
|
|
||||||
|
kt_read = [] # Constant of calibration kt of the ABS read from acoustic file # List of list
|
||||||
|
# for each frequency
|
||||||
|
kt_corrected = {} # Constant of calibration kt of the ABS corrected # Dictionary
|
||||||
|
# Sometimes, the read values of kt are wrong. Then, we define
|
||||||
|
# default values for all frequency of the ABS.
|
||||||
|
|
||||||
|
water_attenuation = [] # Sound attenuation in water for each frequency and for one temperature # List of lists
|
||||||
|
nb_profiles = [] # Total number of profiles for each frequency = time length # List of lists
|
||||||
|
nb_profiles_per_sec = [] # Profile rate (Hz) for each frequency # List of lists
|
||||||
|
nb_cells = [] # Number of cells in profiles for each frequency # List of lists
|
||||||
|
cell_size = [] # Cell size for each frequency (m) # List of lists
|
||||||
|
pulse_length = [] # Pulse length (m) # List of lists
|
||||||
|
nb_pings_per_sec = [] # Number of pings per seconds (Hz) # List of lists
|
||||||
|
nb_pings_averaged_per_profile = [] # Profiles per average # List of lists
|
||||||
|
gain_rx = [] # Rx gain # List of lists
|
||||||
|
gain_tx = [] # Tx gain # List of lists
|
||||||
|
|
||||||
|
DataFrame_acoustic = pd.DataFrame()
|
||||||
|
|
||||||
|
# --- Modify raw data limits ---
|
||||||
|
tmin = [] # Minimum boundary of time for each recording : (index, value) # List of tuples
|
||||||
|
tmax = [] # Maximum boundary of time for each recording : (index, value) # List of tuples
|
||||||
|
rmin = [] # Minimum boundary of depth for each recording : (index, value) # List of tuples
|
||||||
|
rmax = [] # Maximum boundary of depth for each recording : (index, value) # List of tuples
|
||||||
|
|
||||||
|
BS_cross_section = [] # BS data limited with tmin and tmax values # List of arrays
|
||||||
|
depth_cross_section = [] # depth limited with rmin and rmax values # List of arrays
|
||||||
|
time_cross_section = [] # time limited with rmin and rmax values # List of arrays
|
||||||
|
|
||||||
|
# --- Detect bottom ---
|
||||||
|
BS_stream_bed = [] # BS data (raw or cross_section) with detected bottom : # List of arrays
|
||||||
|
# 3D array : (freq x depth x time)
|
||||||
|
depth_bottom = [] # Depth value of th bottom : 1D array # List of arrays
|
||||||
|
val_bottom = [] # Level of the BS signal on the bottom : 1D array # List of arrays
|
||||||
|
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
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------------------------------------------------
|
||||||
|
# =========================================================
|
||||||
|
# --- SIGNAL PREPROCESSING TAB ---
|
||||||
|
# =========================================================
|
||||||
|
|
||||||
|
# Variables names # Description # Type
|
||||||
|
|
||||||
path_BS_noise_data = []
|
path_BS_noise_data = []
|
||||||
filename_BS_noise_data = []
|
filename_BS_noise_data = []
|
||||||
BS_noise_raw_data = [] # BS noise raw data : BS signal listen
|
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)
|
BS_noise_averaged_data = [] # BS noise raw data averaged (array has the same shape than BS_raw_data shape)
|
||||||
|
|
||||||
|
date_noise = []
|
||||||
|
hour_noise = []
|
||||||
|
|
||||||
noise_method = []
|
noise_method = []
|
||||||
noise_value = []
|
noise_value = []
|
||||||
SNR_filter_value = []
|
SNR_filter_value = []
|
||||||
Nb_cells_to_average_BS_signal = []
|
Nb_cells_to_average_BS_signal = []
|
||||||
data_preprocessed = []
|
data_preprocessed = []
|
||||||
|
|
||||||
date = []
|
time_snr_reshape = np.array([])
|
||||||
date_noise = []
|
SNR_reshape = np.array([]) # snr is reshape to be included in table of values in acoustic data tab
|
||||||
hour = []
|
|
||||||
hour_noise = []
|
|
||||||
nb_profiles = []
|
|
||||||
nb_profiles_per_sec = []
|
|
||||||
nb_cells = []
|
|
||||||
cell_size = []
|
|
||||||
pulse_length = []
|
|
||||||
nb_pings_per_sec = []
|
|
||||||
nb_pings_averaged_per_profile = []
|
|
||||||
kt_read = []
|
|
||||||
kt_corrected = {}
|
|
||||||
gain_rx = []
|
|
||||||
gain_tx = []
|
|
||||||
|
|
||||||
SNR_raw_data = [] # SNR is computed with BS_noise_averaged_data
|
SNR_raw_data = [] # SNR is computed with BS_noise_averaged_data
|
||||||
time_noise = []
|
time_noise = []
|
||||||
depth_noise = []
|
depth_noise = []
|
||||||
|
|
||||||
# --- reshape raw data for table of values in Acoustic Data tab ---
|
|
||||||
time_reshape = []
|
|
||||||
time_snr_reshape = np.array([])
|
|
||||||
depth_reshape = []
|
|
||||||
BS_raw_data_reshape = []
|
|
||||||
SNR_reshape = np.array([]) # snr is reshape to be included in table of values in acoustic data tab
|
|
||||||
DataFrame_acoustic = pd.DataFrame()
|
|
||||||
|
|
||||||
# --- Processed data in Acoustic Data Tab and used in Acoustic processing tab ---
|
|
||||||
tmin = [] # minimum boundary of time (spin box tmin)
|
|
||||||
tmin_snr = np.array([])
|
tmin_snr = np.array([])
|
||||||
tmax = [] # maximum boundary of time (spin box tmin)
|
|
||||||
tmax_snr = np.array([])
|
tmax_snr = np.array([])
|
||||||
rmin = []
|
|
||||||
rmax = []
|
|
||||||
BS_cross_section = [] # BS data limited with tmin and tmax values of spin box
|
|
||||||
|
|
||||||
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 = [] # BS_noise_cross_section = BS_noise_data[:, :, tmin:tmax] (former Noise_data)
|
# 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_cross_section = [] # SNR_data = snr[:, :, tmin:tmax]
|
||||||
SNR_stream_bed = []
|
SNR_stream_bed = []
|
||||||
time_cross_section = []
|
|
||||||
time_snr = []
|
time_snr = []
|
||||||
depth_cross_section = []
|
time_average = np.array([])
|
||||||
depth_bottom = []
|
SNR_data_average = np.array([]) # SNR data computed with BS signal averaged (not with BS raw signal)
|
||||||
val_bottom = []
|
|
||||||
ind_bottom = []
|
|
||||||
freq_bottom_detection = []
|
|
||||||
depth_bottom_detection_1st_int_area = []
|
|
||||||
|
|
||||||
# --- 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_averaged = np.array([[[]]]) # BS data averaged - bottom is not detected
|
|
||||||
# BS_cross_section_averaged_SNR = np.array([[[]]]) # BS data averaged and filtered with SNR - bottom is not detected
|
|
||||||
|
|
||||||
# BS_stream_bed_SNR_filter = np.array([]) # BS data filtered with SNR values (remove point if SNR < value) - bottom is detected
|
|
||||||
# BS_stream_bed_averaged = np.array([]) # BS data averaged - bottom is detected
|
|
||||||
# BS_stream_bed_averaged_SNR = np.array([]) # BS data averaged and filtered with SNR - bottom is detected
|
|
||||||
|
|
||||||
BS_raw_data_pre_process_SNR = []
|
BS_raw_data_pre_process_SNR = []
|
||||||
BS_raw_data_pre_process_average = []
|
BS_raw_data_pre_process_average = []
|
||||||
BS_raw_data_pre_process_SNR_average = []
|
BS_raw_data_pre_process_SNR_average = []
|
||||||
@@ -99,16 +131,18 @@ BS_stream_bed_pre_process_SNR = [] # BS data filtered with SNR value
|
|||||||
BS_stream_bed_pre_process_average = [] # BS data averaged - 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_average = [] # BS data averaged and filtered with SNR - bottom is detected
|
||||||
|
|
||||||
time_average = np.array([])
|
# ----------------------------------------------------------------------------------------------------------------------
|
||||||
SNR_data_average = np.array([]) # SNR data computed with BS signal averaged (not with BS raw signal)
|
# =========================================================
|
||||||
|
# --- SAMPLE DATA TAB ---
|
||||||
|
# =========================================================
|
||||||
|
|
||||||
sediment_attenuation = []
|
# Variables names # Description # Type
|
||||||
|
|
||||||
FCB = []
|
# --- Fine sediment Data ---
|
||||||
depth_real = []
|
|
||||||
lin_reg = []
|
|
||||||
|
|
||||||
# --- Sample Data ---
|
|
||||||
|
|
||||||
|
# --- Sand sediment Data ---
|
||||||
|
|
||||||
sample_fine = []
|
sample_fine = []
|
||||||
|
|
||||||
@@ -158,19 +192,18 @@ Ctot_sand_per_cent = []
|
|||||||
fine_sample_position = []
|
fine_sample_position = []
|
||||||
sand_sample_position = []
|
sand_sample_position = []
|
||||||
|
|
||||||
# --- Acoustic inversion method ---
|
|
||||||
|
|
||||||
temperature = 0
|
# ----------------------------------------------------------------------------------------------------------------------
|
||||||
water_attenuation = []
|
# =========================================================
|
||||||
water_velocity = 0
|
# --- SEDIMENT CALIBRATION TAB ---
|
||||||
|
# =========================================================
|
||||||
|
|
||||||
# kt_corrected = np.array([])
|
# Variables names # Description # Type
|
||||||
# kt_corrected_2D = np.array([])
|
|
||||||
# kt_corrected_3D = np.array([])
|
|
||||||
|
|
||||||
frequencies_to_compute_VBI = np.array([])
|
sediment_attenuation = []
|
||||||
VBI_cross_section = []
|
FCB = []
|
||||||
# VBI_stream_bed = np.array([[[]]])
|
depth_real = []
|
||||||
|
lin_reg = []
|
||||||
|
|
||||||
# --- Sediment Calibration
|
# --- Sediment Calibration
|
||||||
frequencies_for_calibration = []
|
frequencies_for_calibration = []
|
||||||
@@ -192,6 +225,18 @@ J_cross_section = []
|
|||||||
|
|
||||||
frequency_for_inversion = tuple()
|
frequency_for_inversion = tuple()
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------------------------------------------------
|
||||||
|
# =========================================================
|
||||||
|
# --- ACOUSTIC INVERSION TAB ---
|
||||||
|
# =========================================================
|
||||||
|
|
||||||
|
# Variables names # Description # Type
|
||||||
|
|
||||||
|
frequencies_to_compute_VBI = np.array([])
|
||||||
|
VBI_cross_section = []
|
||||||
|
# VBI_stream_bed = np.array([[[]]])
|
||||||
|
|
||||||
SSC_fine = []
|
SSC_fine = []
|
||||||
SSC_sand = []
|
SSC_sand = []
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user