Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • software_public/passoft/sohstationviewer
1 result
Show changes
Commits on Source (13)
Showing
with 126 additions and 5 deletions
<img alt="Whole Section" src="images/select_waveform/whole_section.png" width="250" />
<br />
# Selecting Waveforms
---------------------------
---------------------------
## Selecting all waveform channels
Check the checkbox "All Waveform Channels"
<br />
<img alt="Select all waveform channels" src="images/select_waveform/check_all_waveform_channels.png" height="40" />
<br />
## Selecting no waveform channels
Unchecked the checkbox "All Waveform Channels", unchecked all "DSs" checkboxes, clear textbox "MSeed Wildcards".
<br />
<img alt="Select no waveform channels" src="images/select_waveform/check_none_waveform_channels.png" width="250" />
<br />
## Selecting data streams for Reftek
Check some of "DSs" checkboxes with the index corresponding to the data streams you want to select.
<br />
<img alt="Select data streams" src="images/select_waveform/select_data_stream.png" width="250" />
<br />
If some "DSs" are checked, but data type isn't Reftek and either TPS or RAW are checked, a warning will be created, "Checked data streams will be ignored for none-RT130 data type."
## Selecting mseed's waveform
User can add different wildcards separated with commas to MSeed Wildcard textbox.
For example: \*, LH*, L*1.
<br />
<img alt="Select data streams" src="images/select_waveform/mseed_wildcards.png" width="250" />
<br />
If some wildcard are added, but data type is Reftek and either TPS or RAW are checked, a warning will be created, "Checked data streams will be ignored for RT130 data type."
## Displaying waveform channels
If one of TPS or RAW checkboxes aren't checked which means no data need to be displayed, all the waveform selected will be ignored.
To display waveform channels, user need to check:
+ <img alt="TPS" src="images/select_waveform/select_TPS.png" height="30" />: to diplay Time-Power-Squared of the selected waveform data
+ <img alt="RAW" src="images/select_waveform/select_RAW.png" height="30" />: and check RAW to display the actual selected waveform data.
<br />
\ No newline at end of file
<img alt="Whole Section" src="images/select_soh/whole_section.png" width="250" />
<br />
# Selecting SOH Channels
---------------------------
---------------------------
## Selecting all SOH channels
To read all SOH channels in the selected data set, check the checkbox "All SOH".
<br />
<img alt="Select all SOH channels" src="images/select_soh/all_soh_checkbox.png" height="30" />
<br />
If this checkbox is unchecked, the latest Preferred SOH list will be used when reading the data set.
<br />
<img alt="Current preferred SOH list" src="images/select_soh/current_soh_list.png" height="30" />
<br />
## Get a preferred SOH channel list to read
Click button "Pref" to open "SOH Channel Preferences" to create/edit/select a list of SOH channel to read.
<br />
<img alt="SOH Channel Preferences Dialog" src="images/select_soh/soh_channel_preferences.png" height="300" />
<br />
### SOH channel list
Each row in the table at the center of "SOH Channel Preferences" window represents an SOH list.
<br />
<img alt="A Row of SOH List" src="images/select_soh/full_row.png" height="75" />
<br />
### Select an SOH channel list
Check on the radio button (1) at the beginning of each row to select the list.
The radio button can also be checked automatically when user try to edit the row.
### Create a new list
+ Add name of the list to the Name box (2)
+ Select a Data Type (3)
+ Add preferred channels to Preferred SOH List box (4). Channels are separated by commas.
+ The Preferred SOH List can be edited directly in box 4, but user can also click on button EDIT (5) to open a separated dialog for editing easier.
+ Button CLR (6) is for quickly empty the Preferred SOH List box.
### Bottom buttons
<br />
<img alt="Buttons" src="images/select_soh/buttons.png" height="30" />
<br />
**Beside adding preferred channels manually, users have two other options to start the list:**
+ "Add DB channels". All SOH channels for the selected Data Type in the database will be added to Preferred SOH List box.
+ "Scan Channel from Data Source". SOHView will scan for all available SOH channels in the data set.
**For saving Preferred SOH List**
+ "Save": Save any changes to database
+ "Save - Add to Main": Save any changes to database and add the selected Preferred SOH's name to Main Window so that its SOH list will be included when reading the data set.
\ No newline at end of file
documentation/images/select_soh/all_soh_checkbox.png

7.21 KiB

documentation/images/select_soh/buttons.png

19.4 KiB

documentation/images/select_soh/current_soh_list.png

4.59 KiB

documentation/images/select_soh/full_row.png

38.1 KiB

documentation/images/select_soh/soh_channel_preferences.png

319 KiB

documentation/images/select_soh/whole_section.png

10.2 KiB

documentation/images/select_waveform/check_all_waveform_channels.png

8.62 KiB

documentation/images/select_waveform/check_none_waveform_channels.png

15.6 KiB

documentation/images/select_waveform/mseed_wildcards.png

9.06 KiB

documentation/images/select_waveform/select_RAW.png

3.29 KiB

documentation/images/select_waveform/select_TPS.png

3.14 KiB

documentation/images/select_waveform/select_data_stream.png

11.1 KiB

documentation/images/select_waveform/warning_select_DSs.png

24.4 KiB

documentation/images/select_waveform/whole_section.png

30.8 KiB

# waveform pattern
WF_1ST = 'A-HLM-V'
WF_2ND = 'HLN'
WF_3RD = 'ZNE123'
# to calc min()
HIGHEST_INT = 1E100
......
import re
from sohstationviewer.conf.constants import (WF_1ST, WF_2ND, WF_3RD)
"""
seisRE: Seismic data channels' regex:
First letter(Band Code): ABCDEFGHLMOPQRSTUV
......@@ -10,8 +11,7 @@ Third letter (Orientation Code): ZNE123
dbConf = {
'dbpath': 'sohstationviewer/database/soh.db',
'seisRE': re.compile('[A-HLM-V][HLN][ZNE123]'),
'wfReq': re.compile('^[A-HLM-V\*]([HLN\*][ZNE123\*]?)?$'), # noqa: W605
'seisRE': re.compile(f'[{WF_1ST}][{WF_2ND}][{WF_3RD}]'),
# key is last char of chan
'seisLabel': {'1': 'NS', '2': 'EW', 'N': 'NS', 'E': 'EW', 'Z': 'V'},
# +0.2:Y
......
......@@ -43,8 +43,6 @@ def display_tracking_info(tracking_box: QTextBrowser, text: str,
:param type: (info/warning/error) type of info to be displayed in
different color
"""
print(text)
return
if tracking_box is None:
print(f"{type.name}: {text}")
return
......
......@@ -3,12 +3,13 @@ import os
from tempfile import mkdtemp
import shutil
from typing import List, Tuple, Dict, Optional, Union
from typing import Optional, Union, List, Tuple, Dict
from PySide2 import QtCore
from sohstationviewer.controller.util import display_tracking_info
from sohstationviewer.conf import constants
from sohstationviewer.model.gps_point import GPSPoint
from sohstationviewer.view.util.enums import LogType
from sohstationviewer.database.process_db import execute_db
......@@ -234,6 +235,8 @@ class DataTypeModel():
self._pauser = QtCore.QSemaphore()
self.pause_response = None
self.gps_points: List[GPSPoint] = []
def __del__(self):
print("delete dataType Object")
try:
......@@ -366,3 +369,12 @@ class DataTypeModel():
def save_temp_data_folder_to_database(self):
execute_db(f'UPDATE PersistentData SET FieldValue="{self.tmp_dir}" '
f'WHERE FieldName="tempDataDirectory"')
def check_not_found_soh_chans(self):
not_found_soh_chans = [
c for c in self.req_soh_chans
if c not in self.soh_data[self.selected_key].keys()]
if not_found_soh_chans != []:
msg = (f"No data found for soh channels: "
f"{', '.join( not_found_soh_chans)}")
self.processing_log.append((msg, LogType.WARNING))