diff --git a/sohstationviewer/view/main_window.py b/sohstationviewer/view/main_window.py index d848a1fffd7ea5bbe6b7da62d5500fbc29f9e166..479563ee3c7bc502992d700ec55f096c751ad166 100755 --- a/sohstationviewer/view/main_window.py +++ b/sohstationviewer/view/main_window.py @@ -7,7 +7,7 @@ from typing import List, Tuple, Union, Dict from pathlib import Path from PySide6 import QtCore, QtWidgets, QtGui -from PySide6.QtCore import QSize +from PySide6.QtCore import QSize, QCoreApplication from PySide6.QtGui import QFont, QPalette, QColor from PySide6.QtWidgets import QFrame, QListWidgetItem, QMessageBox @@ -859,6 +859,10 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): """ self.is_loading_data = False self.data_object = data_obj + + gps_processing_msg = 'Extracting GPS data...' + display_tracking_info(self.tracking_info_text_browser, + gps_processing_msg) if (self.data_type == 'Q330' and 'LOG' not in data_obj.log_data[data_obj.selected_data_set_id]): log_message = ("Channel 'LOG' is required to get file info and " @@ -900,6 +904,9 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): data_path = dir_path self.gps_dialog.set_data_path(str(data_path)) + extract_data_info_msg = 'Extracting data set info...' + display_tracking_info(self.tracking_info_text_browser, + extract_data_info_msg) data_set_info = extract_data_set_info(data_obj, self.date_format) self.info_list_widget.clear() for info_name, info in data_set_info.items(): @@ -921,6 +928,10 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): Plot using data from self.data_object with the current options set from GUI """ + plotting_start_msg = 'Start plotting data...' + display_tracking_info(self.tracking_info_text_browser, + plotting_start_msg) + QCoreApplication.processEvents() self.replot_button.setEnabled(False) self.clear_plots() if self.has_problem: diff --git a/sohstationviewer/view/plotting/gps_plot/extract_gps_data.py b/sohstationviewer/view/plotting/gps_plot/extract_gps_data.py index ff8380ed6f0eb89707b6bfa634c375383f7fbe54..3cfc52ff8b58f10b6ffb8dc08570582494db23d2 100644 --- a/sohstationviewer/view/plotting/gps_plot/extract_gps_data.py +++ b/sohstationviewer/view/plotting/gps_plot/extract_gps_data.py @@ -1,5 +1,4 @@ import functools -import operator from datetime import datetime from typing import List, Optional, Dict, NoReturn @@ -26,9 +25,7 @@ def extract_gps_data_q330(data_obj: MSeed) -> List[GPSPoint]: continue # Q330 log data is composed of a list of string, so we combine them # into one big string for ease of processing. - log_str = functools.reduce( - operator.iconcat, data_obj.log_data[station]['LOG'], '' - ) + log_str = ''.join(data_obj.log_data[station]['LOG']) log_lines = [line for line in log_str.splitlines() if line != ''] for idx, line in enumerate(log_lines): if line == "GPS Status":