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.

dev-bjvincent
Bjarne Vincent 2025-10-16 17:27:30 +02:00
parent 7a597c32b5
commit 4f9d9074ff
1 changed files with 38 additions and 4 deletions

View File

@ -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)