mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-30 03:10:40 +01:00
Sediment calibration: Recompute kt2D/kt3D and J_cross_section at study open.
This commit is contained in:
1 parent
660a09b09a
commit
c60db3c346
2 files changed
+18
-22
No files matched your search
@@ -870,6 +870,9 @@ class SedimentCalibrationTab(QWidget):
|
||||
self._update_calibration()
|
||||
self.function_pushbutton_plot_sample()
|
||||
|
||||
self.compute_kt2D_kt3D()
|
||||
self.compute_J_cross_section()
|
||||
|
||||
self.blockSignals(False)
|
||||
|
||||
def _update_calibration_parameters(self):
|
||||
@@ -1020,9 +1023,7 @@ class SedimentCalibrationTab(QWidget):
|
||||
|
||||
stg.frequency_for_inversion = tuple()
|
||||
stg.frequency_for_inversion = (
|
||||
stg.freq[data_id][
|
||||
freq2
|
||||
],
|
||||
stg.freq[data_id][freq2],
|
||||
freq2
|
||||
)
|
||||
|
||||
@@ -1030,7 +1031,8 @@ class SedimentCalibrationTab(QWidget):
|
||||
self.verticalLayout_groupbox_data_plot.removeWidget(self.toolbar_BS)
|
||||
self.verticalLayout_groupbox_data_plot.removeWidget(self.canvas_BS)
|
||||
self.fig_BS, self.axis_BS = plt.subplots(
|
||||
nrows=1, ncols=1, sharex=True, sharey=False, layout='constrained'
|
||||
nrows=1, ncols=1, sharex=True, sharey=False,
|
||||
layout='constrained'
|
||||
)
|
||||
self.canvas_BS = FigureCanvas(self.fig_BS)
|
||||
self.toolbar_BS = NavigationToolBar(self.canvas_BS, self)
|
||||
@@ -1041,18 +1043,10 @@ class SedimentCalibrationTab(QWidget):
|
||||
data_id
|
||||
].shape != (0,):
|
||||
val_min = np.nanmin(
|
||||
stg.BS_stream_bed_pre_process_average[
|
||||
data_id
|
||||
][
|
||||
freq2, :, :
|
||||
]
|
||||
stg.BS_stream_bed_pre_process_average[data_id][freq2, :, :]
|
||||
)
|
||||
val_max = np.nanmax(
|
||||
stg.BS_stream_bed_pre_process_average[
|
||||
data_id
|
||||
][
|
||||
freq2, :, :
|
||||
]
|
||||
stg.BS_stream_bed_pre_process_average[data_id][freq2, :, :]
|
||||
)
|
||||
if val_min == 0:
|
||||
val_min = 1e-5
|
||||
@@ -1060,13 +1054,13 @@ class SedimentCalibrationTab(QWidget):
|
||||
if stg.time_cross_section[data_id].shape != (0,):
|
||||
if stg.depth_cross_section[data_id].shape != (0,):
|
||||
self.axis_BS.pcolormesh(
|
||||
stg.time_cross_section[data_id][
|
||||
freq2, :],
|
||||
-stg.depth_cross_section[data_id][
|
||||
freq2, :],
|
||||
stg.time_cross_section[data_id][freq2, :],
|
||||
-stg.depth_cross_section[data_id][freq2, :],
|
||||
stg.BS_stream_bed_pre_process_average[data_id][
|
||||
freq2, :, :],
|
||||
cmap='viridis', norm=LogNorm(vmin=val_min, vmax=val_max))
|
||||
cmap='viridis',
|
||||
norm=LogNorm(vmin=val_min, vmax=val_max)
|
||||
)
|
||||
else:
|
||||
self.axis_BS.pcolormesh(
|
||||
stg.time_cross_section[data_id][
|
||||
|
||||
Reference in new issue
Block a user