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
11d1200c
Commit
11d1200c
authored
1 year ago
by
Kien Le
Browse files
Options
Downloads
Patches
Plain Diff
Documentation and type hint
parent
bfc3b616
No related branches found
No related tags found
1 merge request
!191
Read log files generated by users
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sohstationviewer/model/reftek_data/reftek.py
+19
-2
19 additions, 2 deletions
sohstationviewer/model/reftek_data/reftek.py
with
19 additions
and
2 deletions
sohstationviewer/model/reftek_data/reftek.py
+
19
−
2
View file @
11d1200c
...
...
@@ -70,6 +70,8 @@ class RT130(GeneralData):
def
processing_data
(
self
):
if
self
.
creator_thread
.
isInterruptionRequested
():
raise
ThreadStopped
()
# We separate the reading of log files and real data sets because their
# formats are very different.
if
self
.
rt130_log_files
:
self
.
read_log_files
()
else
:
...
...
@@ -129,6 +131,12 @@ class RT130(GeneralData):
self
.
log_data
[
file_key
][
'
EHET
'
]
=
[(
1
,
reader
.
eh_et_lines
)]
self
.
log_data
[
file_key
][
'
SOH
'
]
=
[(
1
,
reader
.
soh_lines
)]
else
:
# Just in case we are reading multiple files with the same key.
# We are going to assume that the log files are read in order.
# That makes dealing with multiple files a lot easier. We can
# always sort the processed SOH data if this assumption is
# wrong.
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
)
...
...
@@ -136,9 +144,18 @@ class RT130(GeneralData):
self
.
log_data
[
file_key
][
'
SOH
'
].
append
(
(
key_file_count
,
reader
.
soh_lines
)
)
self
.
convert_mass_pos_log_lines_to_data
(
file_key
,
reader
.
masspos_lines
)
self
.
process_mass_pos_log_lines
(
file_key
,
reader
.
masspos_lines
)
def
process_mass_pos_log_lines
(
self
,
current_key
:
Tuple
[
str
,
str
],
masspos_lines
:
List
[
str
]):
"""
Process mass-position log lines and store the result in
self.masspos_data.
def
convert_mass_pos_log_lines_to_data
(
self
,
current_key
,
masspos_lines
):
:param current_key: the current data set key
:param masspos_lines: the mass-position lines to process
"""
# Mass-position channels is suffixed by a number from 1 to 6.
for
masspos_num
in
range
(
1
,
7
):
masspos_string
=
f
'
MassPos
{
masspos_num
}
'
current_lines
=
[
line
.
split
()
...
...
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