Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plotter-nse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
数学の武士
plotter-nse
Commits
b77f1383
Commit
b77f1383
authored
1 year ago
by
数学の武士
Browse files
Options
Downloads
Patches
Plain Diff
Fix dump for dsq
parent
974677a5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plotter/Plotter.py
+1
-1
1 addition, 1 deletion
plotter/Plotter.py
plotter/ProcData.py
+18
-1
18 additions, 1 deletion
plotter/ProcData.py
with
19 additions
and
2 deletions
plotter/Plotter.py
+
1
−
1
View file @
b77f1383
...
...
@@ -404,7 +404,7 @@ class Plotter:
def
__dump
(
self
):
for
variable_name
in
self
.
file_column_names
:
print
(
variable_name
,
end
=
'
'
)
print
(
variable_name
,
end
=
'
;
'
)
print
(
'
\n
'
)
def
__plot_diff
(
self
):
...
...
This diff is collapsed.
Click to expand it.
plotter/ProcData.py
+
18
−
1
View file @
b77f1383
...
...
@@ -82,6 +82,21 @@ class ProcData:
self
.
variable_names
+=
varnames
self
.
variable_names
=
np
.
array
(
self
.
variable_names
,
dtype
=
object
)
def
__get_variable_names_dsq
(
self
):
STIRNG_TERMINATOR
=
'
\x00
'
INT_LEN
=
4
TIME_VAR_NUM
=
0
f
=
open
(
self
.
filename
,
'
rb
'
)
nvars
=
int
.
from_bytes
(
f
.
read
(
INT_LEN
),
byteorder
=
'
little
'
)
names_len
=
int
.
from_bytes
(
f
.
read
(
INT_LEN
),
byteorder
=
'
little
'
)
+
len
(
STIRNG_TERMINATOR
)
self
.
variable_names
=
[]
self
.
variable_names
.
append
(
'
time
'
)
for
_
in
range
(
nvars
):
self
.
variable_names
.
append
(
str
(
f
.
read
(
names_len
),
encoding
=
'
utf-8
'
).
strip
(
STIRNG_TERMINATOR
))
def
__read_plt
(
self
,
ndim
):
with
open
(
self
.
filename
,
"
r
"
)
as
file
:
...
...
@@ -313,4 +328,6 @@ class ProcData:
if
filename_extension
==
'
.plt
'
:
self
.
__get_variable_names_plt
()
elif
filename_extension
==
'
.nsx
'
:
self
.
__get_variable_names_bin
()
\ No newline at end of file
self
.
__get_variable_names_bin
()
elif
filename_extension
==
'
.dsq
'
:
self
.
__get_variable_names_dsq
()
\ No newline at end of file
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