Water attenuation spinbox is activated when the Enter key is pressed.
parent
fe52e097e7
commit
3e52edb45b
|
|
@ -242,6 +242,7 @@ class AcousticDataTab(QWidget):
|
|||
|
||||
self.spinbox_temperature = QDoubleSpinBox()
|
||||
self.spinbox_temperature.setSuffix("°C")
|
||||
self.spinbox_temperature.setKeyboardTracking(False)
|
||||
|
||||
self.label_speed_of_sound = QLabel("Speed of sound : ")
|
||||
|
||||
|
|
@ -1196,7 +1197,8 @@ class AcousticDataTab(QWidget):
|
|||
self.radiobutton_value.toggled.connect(self.onClicked_radiobutton_gps)
|
||||
self.radiobutton_file.toggled.connect(self.onClicked_radiobutton_gps)
|
||||
|
||||
self.spinbox_temperature.valueChanged.connect(self.temperature_value)
|
||||
# self.spinbox_temperature.valueChanged.connect(self.temperature_value)
|
||||
self.spinbox_temperature.lineEdit().returnPressed.connect(self.temperature_value)
|
||||
|
||||
# self.spinbox_tmax.lineEdit().returnPressed.connect(self.time_spin_box_value)
|
||||
# self.spinbox_tmax.lineEdit().returnPressed.connect(self.compute_time)
|
||||
|
|
@ -1672,10 +1674,13 @@ class AcousticDataTab(QWidget):
|
|||
stg.water_velocity[self.fileListWidget.currentRow()] = C
|
||||
self.spinbox_speed_of_sound.setValue(stg.water_velocity[self.fileListWidget.currentRow()])
|
||||
|
||||
print("water velocity ", stg.water_velocity)
|
||||
|
||||
|
||||
# -------- Computing water attenuation coefficient ----------- #
|
||||
def water_attenuation(self):
|
||||
"""Computing attenuation from François and Garrison 1982"""
|
||||
stg.water_attenuation[self.fileListWidget.currentRow()].clear()
|
||||
for f in stg.freq[self.fileListWidget.currentRow()]:
|
||||
if self.spinbox_temperature.value() > 20:
|
||||
alpha = ((3.964 * 1e-4 -
|
||||
|
|
@ -1695,6 +1700,8 @@ class AcousticDataTab(QWidget):
|
|||
self.spinbox_sound_attenuation.setValue(stg.water_attenuation[self.fileListWidget.currentRow()]
|
||||
[self.combobox_frequency_information.currentIndex()])
|
||||
|
||||
print("water attenuation ", stg.water_attenuation)
|
||||
|
||||
def clicked_pushbutton_noise_level(self):
|
||||
self.WindowNoiseLevelTailAveragedProfile().show()
|
||||
|
||||
|
|
@ -4223,8 +4230,8 @@ class AcousticDataTab(QWidget):
|
|||
# Index of the range where we look for the peak
|
||||
# print(f"self.combobox_freq_choice.currentIndex() : {self.combobox_freq_choice.currentIndex()}")
|
||||
# print(f"r = {stg.r}")
|
||||
print(f"ind_min : {np.where(stg.depth_cross_section[self.fileListWidget.currentRow()][int(self.combobox_frequency_bathymetry.currentIndex()), :] >= rmin)}")
|
||||
print(f"ind_max : {np.where(stg.depth_cross_section[self.fileListWidget.currentRow()][int(self.combobox_frequency_bathymetry.currentIndex()), :] <= rmax)}")
|
||||
# print(f"ind_min : {np.where(stg.depth_cross_section[self.fileListWidget.currentRow()][int(self.combobox_frequency_bathymetry.currentIndex()), :] >= rmin)}")
|
||||
# print(f"ind_max : {np.where(stg.depth_cross_section[self.fileListWidget.currentRow()][int(self.combobox_frequency_bathymetry.currentIndex()), :] <= rmax)}")
|
||||
ind_min = np.where(stg.depth_cross_section[self.fileListWidget.currentRow()][int(self.combobox_frequency_bathymetry.currentIndex()), :] >= rmin)[0][0]
|
||||
ind_max = np.where(stg.depth_cross_section[self.fileListWidget.currentRow()][int(self.combobox_frequency_bathymetry.currentIndex()), :] <= rmax)[0][-1]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue