Compare commits
7 Commits
6dbd1e3e5c
...
5ea7879896
| Author | SHA1 | Date |
|---|---|---|
|
|
5ea7879896 | |
|
|
d7ea9cc4f7 | |
|
|
07353ccc3c | |
|
|
a8bb150bf8 | |
|
|
72dff5a26c | |
|
|
26bd476772 | |
|
|
ab3180ec3a |
|
|
@ -759,7 +759,6 @@ class AcousticDataTab(QWidget):
|
|||
self.blockSignals(False)
|
||||
|
||||
def retranslate_acoustic_data_tab(self):
|
||||
|
||||
self.groupbox_info.setTitle(_translate("CONSTANT_STRING", cs.MEASUREMENTS_INFORMATION))
|
||||
|
||||
self.label_date_acoustic_file.setText(_translate("CONSTANT_STRING", cs.DATE) + ":")
|
||||
|
|
@ -1202,10 +1201,18 @@ class AcousticDataTab(QWidget):
|
|||
str("%4s" % stg.distance_from_ABS_to_free_surface[self.fileListWidget.currentRow()]))
|
||||
|
||||
def refresh_distance_from_ABS_to_free_surface(self):
|
||||
self.pushbutton_distance_from_ABS_to_free_surface.blockSignals(True)
|
||||
|
||||
if self.combobox_ABS_system_choice.currentIndex() == 1:
|
||||
acoustic_data = AcousticDataLoader(
|
||||
stg.path_BS_raw_data[self.fileListWidget.currentRow()] + "/" +
|
||||
stg.filename_BS_raw_data[self.fileListWidget.currentRow()]
|
||||
)
|
||||
elif self.combobox_ABS_system_choice.currentIndex() == 2:
|
||||
acoustic_data = AcousticDataLoaderUBSediFlow(
|
||||
stg.path_BS_raw_data[self.fileListWidget.currentRow()] + "/" +
|
||||
stg.filename_BS_raw_data[self.fileListWidget.currentRow()]
|
||||
)
|
||||
|
||||
stg.depth[self.fileListWidget.currentRow()] = acoustic_data._r
|
||||
stg.depth_reshape[self.fileListWidget.currentRow()] = acoustic_data.reshape_r()
|
||||
|
|
@ -1231,6 +1238,8 @@ class AcousticDataTab(QWidget):
|
|||
self.update_plot_backscattered_acoustic_signal_recording()
|
||||
self.update_plot_profile()
|
||||
|
||||
self.pushbutton_distance_from_ABS_to_free_surface.blockSignals(False)
|
||||
|
||||
def setup_temperature_value(self):
|
||||
self.water_velocity()
|
||||
self.water_attenuation()
|
||||
|
|
@ -1728,6 +1737,9 @@ class AcousticDataTab(QWidget):
|
|||
self.fill_measurements_information_groupbox_cells()
|
||||
self.fill_measurements_information_groupbox_kt()
|
||||
|
||||
self.water_velocity()
|
||||
self.water_attenuation()
|
||||
|
||||
def fill_measurements_information_groupbox_datetime(self):
|
||||
file_id = self.fileListWidget.currentRow()
|
||||
print("file_id ", file_id)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
|
||||
import math
|
||||
# by Brahim MOUDJED #
|
||||
# ============================================================================== #
|
||||
|
||||
|
|
@ -47,6 +47,8 @@ from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as Navigatio
|
|||
from matplotlib.colors import LogNorm, BoundaryNorm
|
||||
from os import path
|
||||
|
||||
from numba.np.arraymath import np_average
|
||||
|
||||
from View.show_popup_combobox import ComboBoxShowPopUpWindow
|
||||
from View.plot_noise_window import PlotNoiseWindow
|
||||
|
||||
|
|
@ -1422,8 +1424,7 @@ class SignalProcessingTab(QWidget):
|
|||
val_max = np.nanmax(
|
||||
BS_data[data_id][f, :, :]
|
||||
)
|
||||
|
||||
if val_min == 0:
|
||||
if val_min == 0 or math.isinf(val_min):
|
||||
val_min = 1e-5
|
||||
|
||||
pcm = self.axis_BS[f].pcolormesh(
|
||||
|
|
@ -1459,10 +1460,10 @@ class SignalProcessingTab(QWidget):
|
|||
|
||||
self.fig_BS.supxlabel('Time (sec)', fontsize=10)
|
||||
self.fig_BS.supylabel('Depth (m)', fontsize=10)
|
||||
cbar = self.fig_BS.colorbar(pcm, ax=self.axis_BS[:],
|
||||
shrink=1, location='right')
|
||||
cbar.set_label(label='Acoustic backscatter signal (V)',
|
||||
rotation=270, labelpad=10)
|
||||
# cbar = self.fig_BS.colorbar(pcm, ax=self.axis_BS[:],
|
||||
# shrink=1, location='right')
|
||||
# cbar.set_label(label='Acoustic backscatter signal (V)',
|
||||
# rotation=270, labelpad=10)
|
||||
self.fig_BS.canvas.draw_idle()
|
||||
else:
|
||||
self.verticalLayout_groupbox_plot_pre_processed_data_2D_field\
|
||||
|
|
@ -1508,15 +1509,8 @@ class SignalProcessingTab(QWidget):
|
|||
msgBox.exec()
|
||||
else:
|
||||
data_id = self.combobox_acoustic_data_choice.currentIndex()
|
||||
kernel_avg = np.ones(
|
||||
2 * int(
|
||||
float(
|
||||
self.lineEdit_horizontal_average\
|
||||
.text()\
|
||||
.replace(",", ".")
|
||||
)
|
||||
) + 1
|
||||
)
|
||||
n_average = 2 * int(float(self.lineEdit_horizontal_average.text().replace(",", "."))) + 1
|
||||
kernel_avg = np.ones(n_average)
|
||||
logger.debug(f"kernel_avg: {kernel_avg}")
|
||||
|
||||
stg.Nb_cells_to_average_BS_signal[data_id] = (
|
||||
|
|
@ -1564,16 +1558,34 @@ class SignalProcessingTab(QWidget):
|
|||
|
||||
logger.debug(f"BS_data: {BS_data[data_id].shape}")
|
||||
|
||||
BS_data_ppa[data_id] = deepcopy(BS_data[data_id])
|
||||
# BS_data_ppa[data_id] = deepcopy(BS_data[data_id])
|
||||
#
|
||||
# for f, _ in enumerate(stg.freq[data_id]):
|
||||
# for i in range(y_depth.shape[1]):
|
||||
# BS_data_ppa[data_id][f, i, :] = (
|
||||
# convolve(
|
||||
# BS_data[data_id][f, i, :],
|
||||
# kernel_avg
|
||||
# )
|
||||
# )
|
||||
|
||||
temp_list = []
|
||||
for f, _ in enumerate(stg.freq[data_id]):
|
||||
temp0 = np.array([])
|
||||
for i in range(y_depth.shape[1]):
|
||||
BS_data_ppa[data_id][f, i, :] = (
|
||||
convolve(
|
||||
BS_data[data_id][f, i, :],
|
||||
kernel_avg
|
||||
)
|
||||
)
|
||||
# temp = convolve(BS_data[data_id][f, i, :], kernel_avg, "same") / n_average
|
||||
temp = convolve(array=BS_data[data_id][f, i, :],
|
||||
kernel=kernel_avg,
|
||||
nan_treatment='interpolate')
|
||||
if temp0.shape == (0,):
|
||||
temp0 = np.array([temp])
|
||||
else:
|
||||
temp0 = np.append(temp0, np.array([temp]), axis=0)
|
||||
temp_list.append(temp0)
|
||||
|
||||
BS_data_ppa[data_id] = np.array([temp_list[0]])
|
||||
for j in range(stg.freq[data_id].shape[0]-1):
|
||||
BS_data_ppa[data_id] = np.append(BS_data_ppa[data_id], np.array([temp_list[j+1]]), axis=0)
|
||||
|
||||
logger.debug(
|
||||
f"BS_data_ppa: {BS_data_ppa[data_id].shape}"
|
||||
|
|
|
|||
18
manifest.scm
18
manifest.scm
|
|
@ -36,14 +36,14 @@
|
|||
|
||||
;;; We replace python-numba package by package variant without tests
|
||||
|
||||
(define python-numba-no-check
|
||||
(package
|
||||
(inherit python-numba)
|
||||
(arguments `(#:tests? #f))))
|
||||
;; (define python-numba-no-check
|
||||
;; (package
|
||||
;; (inherit python-numba)
|
||||
;; (arguments `(#:tests? #f))))
|
||||
|
||||
(define rewrite-numba
|
||||
(package-input-rewriting/spec `(("python-numba" .
|
||||
,(const python-numba-no-check)))))
|
||||
;; (define rewrite-numba
|
||||
;; (package-input-rewriting/spec `(("python-numba" .
|
||||
;; ,(const python-numba-no-check)))))
|
||||
|
||||
|
||||
;;; New packages
|
||||
|
|
@ -204,9 +204,9 @@ user-defined extensions).")
|
|||
(concatenate-manifests
|
||||
(list (packages->manifest (list python-pyqt-file-list-widget
|
||||
python-qtrangeslider
|
||||
(rewrite-numba python-astropy)))
|
||||
python-astropy))
|
||||
(specifications->manifest
|
||||
(list "python" "python-dateutil"
|
||||
(list "python" "python-dateutil" "python-numba"
|
||||
"python-scipy" "python-scikit-learn"
|
||||
"python-pyqt@5" "python-pyqt5-sip"
|
||||
"python-numpy@1" "python-pandas@1.5"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
@ECHO OFF
|
||||
|
||||
acoused.exe > error.txt 2>&1
|
||||
|
|
|
|||
Loading…
Reference in New Issue