Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOHViewer
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Public
PASSOFT
SOHViewer
Commits
2775f4dc
Commit
2775f4dc
authored
1 year ago
by
Kien Le
Browse files
Options
Downloads
Patches
Plain Diff
Link log file reader to main window
parent
4ca71372
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/model/reftek_data/reftek.py
+30
-1
30 additions, 1 deletion
sohstationviewer/model/reftek_data/reftek.py
with
30 additions
and
1 deletion
sohstationviewer/model/reftek_data/reftek.py
+
30
−
1
View file @
2775f4dc
...
...
@@ -8,6 +8,8 @@ import numpy as np
from
obspy.core
import
Stream
from
sohstationviewer.conf
import
constants
from
sohstationviewer.model.reftek_data.reftek_reader.log_file_reader
import
\
LogFileReader
from
sohstationviewer.view.util.enums
import
LogType
from
sohstationviewer.model.general_data.general_data
import
\
...
...
@@ -62,7 +64,10 @@ class RT130(GeneralData):
def
processing_data
(
self
):
if
self
.
creator_thread
.
isInterruptionRequested
():
raise
ThreadStopped
()
self
.
read_folders
()
if
self
.
rt130_log_files
:
self
.
read_log_files
()
else
:
self
.
read_folders
()
self
.
selected_key
=
self
.
select_key
()
if
self
.
creator_thread
.
isInterruptionRequested
():
...
...
@@ -102,6 +107,30 @@ class RT130(GeneralData):
# this happens when there is text or ascii only in the data
self
.
data_time
[
key
]
=
[
self
.
read_start
,
self
.
read_end
]
def
read_log_files
(
self
):
"""
Read data from self.rt130_log_files and store it in self.log_data
"""
for
log_file
in
self
.
rt130_log_files
:
reader
=
LogFileReader
(
log_file
)
reader
.
read
()
file_key
=
(
reader
.
station_code
,
reader
.
experiment_number
)
self
.
populate_cur_key_for_all_data
(
file_key
)
# We are creating the value for both keys 'SOH' and 'EHET' in this
# method (unlike how RT130 is usually read), so we only need to do
# one check.
if
'
EHET
'
not
in
self
.
log_data
[
file_key
]:
self
.
log_data
[
file_key
][
'
EHET
'
]
=
[(
1
,
reader
.
eh_et_lines
)]
self
.
log_data
[
file_key
][
'
SOH
'
]
=
[(
1
,
reader
.
soh_lines
)]
else
:
key_file_count
=
self
.
log_data
[
file_key
][
'
EHET
'
][
-
1
][
0
]
+
1
self
.
log_data
[
file_key
][
'
EHET
'
].
append
(
(
key_file_count
,
reader
.
eh_et_lines
)
)
self
.
log_data
[
file_key
][
'
SOH
'
].
append
(
(
key_file_count
,
reader
.
soh_lines
)
)
def
read_folders
(
self
)
->
None
:
"""
Read data from list_of_dir or list_of_rt130_paths for soh,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment