Inversion: Some refactoring.
parent
9260797c8f
commit
598635dca3
|
|
@ -881,26 +881,34 @@ class AcousticInversionTab(QWidget):
|
|||
self.update_lineEdit_by_moving_slider_fine()
|
||||
|
||||
def profile_number_on_lineEdit_fine(self):
|
||||
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
|
||||
self.slider_fine.setValue(
|
||||
int(np.where(
|
||||
np.abs(stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
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]))
|
||||
data_id = self.combobox_acoustic_data_choice.currentIndex()
|
||||
|
||||
if stg.time_cross_section[data_id].shape != (0,):
|
||||
time_data = stg.time_cross_section
|
||||
else:
|
||||
self.slider_fine.setValue(
|
||||
int(np.where(
|
||||
np.abs(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
stg.frequency_for_inversion[1]] -
|
||||
float(self.lineEdit_slider_fine.text().replace(",", "."))) ==
|
||||
np.nanmin(
|
||||
np.abs(stg.time[self.combobox_acoustic_data_choice.currentIndex()][
|
||||
stg.frequency_for_inversion[1]] -
|
||||
float(self.lineEdit_slider_fine.text().replace(",", ".")))))[0][0]))
|
||||
time_data = stg.time
|
||||
|
||||
slider_value = float(
|
||||
self.lineEdit_slider_fine.text().replace(",", ".")
|
||||
)
|
||||
|
||||
self.slider_fine.setValue(
|
||||
int(
|
||||
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):
|
||||
if stg.time_cross_section[self.combobox_acoustic_data_choice.currentIndex()].shape != (0,):
|
||||
|
|
|
|||
Loading…
Reference in New Issue