mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-30 03:10:40 +01:00
Inversion: Some refactoring.
This commit is contained in:
1 parent
9260797c8f
commit
598635dca3
1 file changed
+27
-19
@@ -881,26 +881,34 @@ class AcousticInversionTab(QWidget):
|
|||||||
self.update_lineEdit_by_moving_slider_fine()
|
self.update_lineEdit_by_moving_slider_fine()
|
||||||
|
|
||||||
def profile_number_on_lineEdit_fine(self):
|
def profile_number_on_lineEdit_fine(self):
|
||||||
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
|
data_id = self.combobox_acoustic_data_choice.currentIndex()
|
||||||
self.slider_fine.setValue(
|
|
||||||
int(np.where(
|
if stg.time_cross_section[data_id].shape != (0,):
|
||||||
np.abs(stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
|
time_data = stg.time_cross_section
|
||||||
stg.frequency_for_inversion[1]] -
|
|
||||||
float(self.lineEdit_slider_fine.text().replace(",", "."))) ==
|
|
||||||
np.nanmin(
|
|
||||||
np.abs(stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
|
|
||||||
stg.frequency_for_inversion[1]] -
|
|
||||||
float(self.lineEdit_slider_fine.text().replace(",", ".")))))[0][0]))
|
|
||||||
else:
|
else:
|
||||||
self.slider_fine.setValue(
|
time_data = stg.time
|
||||||
int(np.where(
|
|
||||||
np.abs(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
slider_value = float(
|
||||||
stg.frequency_for_inversion[1]] -
|
self.lineEdit_slider_fine.text().replace(",", ".")
|
||||||
float(self.lineEdit_slider_fine.text().replace(",", "."))) ==
|
)
|
||||||
np.nanmin(
|
|
||||||
np.abs(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
self.slider_fine.setValue(
|
||||||
stg.frequency_for_inversion[1]] -
|
int(
|
||||||
float(self.lineEdit_slider_fine.text().replace(",", ".")))))[0][0]))
|
np.where(
|
||||||
|
np.abs(
|
||||||
|
time_data[data_id][
|
||||||
|
stg.frequency_for_inversion[1]
|
||||||
|
] - slider_value
|
||||||
|
) == np.nanmin(
|
||||||
|
np.abs(
|
||||||
|
time_data[data_id][
|
||||||
|
stg.frequency_for_inversion[1]
|
||||||
|
] - slider_value
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)[0][0]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def update_lineEdit_by_moving_slider_fine(self):
|
def update_lineEdit_by_moving_slider_fine(self):
|
||||||
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
|
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
|
||||||
|
|||||||
Reference in new issue
Block a user