Compare commits

...

3 Commits

3 changed files with 59 additions and 50 deletions

View File

@ -199,12 +199,17 @@ class ReadTableForOpen:
logger.debug(f"- stg.kt_read {stg.kt_read}") logger.debug(f"- stg.kt_read {stg.kt_read}")
logger.debug(f"- stg.kt_corrected {stg.kt_corrected}") logger.debug(f"- stg.kt_corrected {stg.kt_corrected}")
logger.debug(f"- stg.nb_profiles {stg.nb_profiles}") logger.debug(f"- stg.nb_profiles {stg.nb_profiles}")
logger.debug(f"- stg.nb_profiles_per_sec {stg.nb_profiles_per_sec}") logger.debug(
f"- stg.nb_profiles_per_sec {stg.nb_profiles_per_sec}"
)
logger.debug(f"- stg.nb_cells {stg.nb_cells}") logger.debug(f"- stg.nb_cells {stg.nb_cells}")
logger.debug(f"- stg.cell_size {stg.cell_size}") logger.debug(f"- stg.cell_size {stg.cell_size}")
logger.debug(f"- stg.pulse_length {stg.pulse_length}") logger.debug(f"- stg.pulse_length {stg.pulse_length}")
logger.debug(f"- stg.nb_pings_per_sec {stg.nb_pings_per_sec}") logger.debug(f"- stg.nb_pings_per_sec {stg.nb_pings_per_sec}")
logger.debug(f"- stg.nb_pings_averaged_per_profile {stg.nb_pings_averaged_per_profile}") logger.debug(
"- stg.nb_pings_averaged_per_profile "
+ f"{stg.nb_pings_averaged_per_profile}"
)
logger.debug(f"- stg.gain_rx {stg.gain_rx}") logger.debug(f"- stg.gain_rx {stg.gain_rx}")
logger.debug(f"- stg.gain_tx {stg.gain_tx}") logger.debug(f"- stg.gain_tx {stg.gain_tx}")
@ -379,8 +384,8 @@ class ReadTableForOpen:
it = iter(data) it = iter(data)
time = next(it) time = np_f64_parse(next(it))
depth = next(it) depth = np_f64_parse(next(it))
BS = np_f64_parse(next(it)) BS = np_f64_parse(next(it))
if len(BS) == 0: if len(BS) == 0:
@ -390,12 +395,12 @@ class ReadTableForOpen:
stg.BS_noise_averaged_data.append(np.array([])) stg.BS_noise_averaged_data.append(np.array([]))
else: else:
stg.time_noise.append( stg.time_noise.append(
np_f64_parse(time).reshape( time.reshape(
(stg.freq[i].shape[0], -1) (stg.freq[i].shape[0], -1)
) )
) )
stg.depth_noise.append( stg.depth_noise.append(
np_f64_parse(depth).reshape( depth.reshape(
(stg.freq[i].shape[0], -1) (stg.freq[i].shape[0], -1)
) )
) )

View File

@ -29,19 +29,18 @@ import os
class Logos(): class Logos():
def __init__(self): def __init__(self):
self.logo_AcouSed = os.path.join('logos', "AcouSed.png")
self.logo_AcouSed = (os.path.join('logos', "AcouSed.png")) self.logo_INRAE = os.path.join('logos', "BlocMarque-INRAE-Inter.jpg")
self.logo_INRAE = (os.path.join('logos', "BlocMarque-INRAE-Inter.jpg")) self.logo_OSR = os.path.join('logos', "OSR.png")
self.logo_europe = os.path.join('logos', "Europe.png")
self.logo_saone_rhone = os.path.join('logos', "plan_Rhone_Saone.png")
self.logo_carnot = os.path.join('logos', "Carnot_EE.png")
self.logo_OSR = (os.path.join('logos', "OSR.png")) self.logo_CNR = os.path.join('logos', "CNR.png")
self.logo_europe = (os.path.join('logos', "Europe.png")) self.logo_EDF = os.path.join('logos', "EDF.png")
self.logo_saone_rhone = (os.path.join('logos', "plan_Rhone_Saone.png")) self.logo_Ubertone = os.path.join('logos', "Ubertone.jpg")
self.logo_carnot = (os.path.join('logos', "Carnot_EE.png"))
self.logo_CNR = (os.path.join('logos', "CNR.png"))
self.logo_EDF = (os.path.join('logos', "EDF.png"))
self.logo_Ubertone = (os.path.join('logos', "Ubertone.jpg"))
logos_inst = Logos() logos_inst = Logos()
@ -49,7 +48,6 @@ logos_inst = Logos()
class AboutWindow(QDialog): class AboutWindow(QDialog):
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.setGeometry(400, 200, 350, 200) self.setGeometry(400, 200, 350, 200)

View File

@ -629,33 +629,16 @@ class SignalProcessingTab(QWidget):
if len(stg.BS_noise_raw_data) == 0: if len(stg.BS_noise_raw_data) == 0:
self.load_noise_data_and_compute_SNR() self.load_noise_data_and_compute_SNR()
else: else:
self.compute_noise() for i in range(self.combobox_acoustic_data_choice.count()):
self.compute_noise(i)
elif stg.noise_method[data_id] == 1: elif stg.noise_method[data_id] == 1:
self.compute_noise_from_profile_tail_value() self.compute_noise_from_profile_tail_value()
self.remove_point_with_snr_filter() self.remove_point_with_snr_filter()
self.compute_averaged_BS_data() self.compute_averaged_BS_data()
def compute_noise(self): @trace
data_id = max(0, self.combobox_acoustic_data_choice.currentIndex()) def compute_noise(self, data_id):
if stg.time_cross_section[data_id].shape != (0,):
stg.time_noise[data_id] = (
stg.time_cross_section[data_id]
)
else:
stg.time_noise[data_id] = (
stg.time[data_id]
)
if stg.depth_cross_section[data_id].shape != (0,):
stg.depth_noise[data_id] = (
stg.depth_cross_section[data_id]
)
else:
stg.depth_noise[data_id] = (
stg.depth[data_id]
)
if self._is_correct_shape(stg.BS_stream_bed): if self._is_correct_shape(stg.BS_stream_bed):
BS_data = stg.BS_stream_bed BS_data = stg.BS_stream_bed
SNR_data = stg.SNR_stream_bed SNR_data = stg.SNR_stream_bed
@ -721,18 +704,29 @@ class SignalProcessingTab(QWidget):
def groupbox_download_noise_file_size_change(self): def groupbox_download_noise_file_size_change(self):
duration = 500 duration = 500
self.animation_groupbox_download_noise_file = QPropertyAnimation(self.groupbox_download_noise_file, b"size") self.animation_groupbox_download_noise_file = QPropertyAnimation(
self.groupbox_download_noise_file, b"size"
)
self.animation_groupbox_download_noise_file.setDuration(duration) self.animation_groupbox_download_noise_file.setDuration(duration)
self.animation_groupbox_download_noise_file.setStartValue(QSize(self.groupbox_download_noise_file.width(), self.animation_groupbox_download_noise_file.setStartValue(
self.groupbox_download_noise_file.height())) QSize(
self.groupbox_download_noise_file.width(),
self.groupbox_download_noise_file.height()
)
)
if self.groupbox_download_noise_file.isChecked(): if self.groupbox_download_noise_file.isChecked():
self.animation_groupbox_download_noise_file.setEndValue( self.animation_groupbox_download_noise_file.setEndValue(
QSize(self.groupbox_download_noise_file.width(), QSize(
self.groupbox_download_noise_file.sizeHint().height())) self.groupbox_download_noise_file.width(),
self.groupbox_download_noise_file.sizeHint().height()
)
)
else: else:
self.animation_groupbox_download_noise_file.setEndValue(QSize(self.groupbox_download_noise_file.width(), 25)) self.animation_groupbox_download_noise_file.setEndValue(
QSize(self.groupbox_download_noise_file.width(), 25)
)
self.animation_groupbox_download_noise_file.start() self.animation_groupbox_download_noise_file.start()
@ -744,18 +738,29 @@ class SignalProcessingTab(QWidget):
def groupbox_option_profile_tail_size_change(self): def groupbox_option_profile_tail_size_change(self):
duration = 500 duration = 500
self.animation_groupbox_option_profile_tail = QPropertyAnimation(self.groupbox_option_profile_tail, b"size") self.animation_groupbox_option_profile_tail = QPropertyAnimation(
self.groupbox_option_profile_tail, b"size"
)
self.animation_groupbox_option_profile_tail.setDuration(duration) self.animation_groupbox_option_profile_tail.setDuration(duration)
self.animation_groupbox_option_profile_tail.setStartValue(QSize(self.groupbox_option_profile_tail.width(), self.animation_groupbox_option_profile_tail.setStartValue(
self.groupbox_option_profile_tail.height())) QSize(
self.groupbox_option_profile_tail.width(),
self.groupbox_option_profile_tail.height()
)
)
if self.groupbox_option_profile_tail.isChecked(): if self.groupbox_option_profile_tail.isChecked():
self.animation_groupbox_option_profile_tail.setEndValue( self.animation_groupbox_option_profile_tail.setEndValue(
QSize(self.groupbox_option_profile_tail.width(), QSize(
self.groupbox_option_profile_tail.sizeHint().height())) self.groupbox_option_profile_tail.width(),
self.groupbox_option_profile_tail.sizeHint().height()
)
)
else: else:
self.animation_groupbox_option_profile_tail.setEndValue(QSize(self.groupbox_option_profile_tail.width(), 25)) self.animation_groupbox_option_profile_tail.setEndValue(
QSize(self.groupbox_option_profile_tail.width(), 25)
)
self.animation_groupbox_option_profile_tail.start() self.animation_groupbox_option_profile_tail.start()
@ -1139,6 +1144,7 @@ class SignalProcessingTab(QWidget):
self.compute_noise_from_profile_tail_value_compute() self.compute_noise_from_profile_tail_value_compute()
@trace
def compute_noise_from_profile_tail_value_compute(self): def compute_noise_from_profile_tail_value_compute(self):
data_id = max(0, self.combobox_acoustic_data_choice.currentIndex()) data_id = max(0, self.combobox_acoustic_data_choice.currentIndex())