From 4f9d9074ff27ca6e680364c97fd6c7a358adb217 Mon Sep 17 00:00:00 2001 From: Bjarne Vincent Date: Thu, 16 Oct 2025 17:27:30 +0200 Subject: [PATCH] Hard-coded the ability to choose one of the frequency couple for performing the acoustic inversion. I also added the missing parenthesis in the plot labels. --- View/acoustic_inversion_tab.py | 42 ++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/View/acoustic_inversion_tab.py b/View/acoustic_inversion_tab.py index 823fe03..f260fb9 100644 --- a/View/acoustic_inversion_tab.py +++ b/View/acoustic_inversion_tab.py @@ -552,6 +552,27 @@ class AcousticInversionTab(QWidget): stg.SSC_fine[data_id] = np.array([]) + ''' + stg.SSC_fine[data_id] = self.inv_hc.SSC_fine( + zeta=stg.zeta[0], + r2D=stg.depth_2D[data_id][stg.frequencies_for_calibration[0][1]], + VBI=stg.VBI_cross_section[data_id], + freq=stg.frequencies_for_calibration[0][0], + X=stg.X_exponent[0], + j_cross_section=stg.J_cross_section[data_id][0], + alpha_w=np.full( + shape=stg.depth_2D[data_id][ + stg.frequencies_for_calibration[0][1] + ].shape, + fill_value=stg.water_attenuation[data_id][ + stg.frequencies_for_calibration[0][1] + ] + ) + ) #Inversion using the first frequency + ''' + + + stg.SSC_fine[data_id] = self.inv_hc.SSC_fine( zeta=stg.zeta[1], r2D=stg.depth_2D[data_id][stg.frequency_for_inversion[1]], @@ -567,19 +588,32 @@ class AcousticInversionTab(QWidget): stg.frequency_for_inversion[1] ] ) - ) + ) #Inversion using the second frequency + def compute_SSC_sand(self): data_id = self.combobox_acoustic_data_choice.currentIndex() stg.SSC_sand[data_id] = np.array([]) + ''' + stg.SSC_sand[data_id] = self.inv_hc.SSC_sand( + VBI=stg.VBI_cross_section[data_id], + freq=stg.frequencies_for_calibration[0][0], + X=stg.X_exponent, + ks=stg.ks[0] + ) #Inversion using the first frequency + ''' + + stg.SSC_sand[data_id] = self.inv_hc.SSC_sand( VBI=stg.VBI_cross_section[data_id], freq=stg.frequencies_for_calibration[1][0], X=stg.X_exponent, ks=stg.ks[1] - ) + ) #Inversion using the second frequency + + def plot_SSC_fine(self): data_id = self.combobox_acoustic_data_choice.currentIndex() @@ -694,7 +728,7 @@ class AcousticInversionTab(QWidget): pcm_SSC_fine, ax=self.axis_SSC_fine, shrink=1, location='right' ) - cbar_SSC_fine.set_label(label='Fine SSC (g/L', rotation=270, labelpad=15) + cbar_SSC_fine.set_label(label='Fine SSC (g/L)', rotation=270, labelpad=15) self.figure_SSC_fine.supxlabel("Time (sec)", fontsize=10) self.figure_SSC_fine.supylabel("Depth (m)", fontsize=10) @@ -1259,7 +1293,7 @@ class AcousticInversionTab(QWidget): pcm_SSC_sand, ax=self.axis_SSC_sand, shrink=1, location='right' ) - cbar_SSC_sand.set_label(label='Sand SSC (g/L', rotation=270, labelpad=15) + cbar_SSC_sand.set_label(label='Sand SSC (g/L)', rotation=270, labelpad=15) self.figure_SSC_sand.supxlabel("Time (sec)", fontsize=10) self.figure_SSC_sand.supylabel("Depth (m)", fontsize=10)