Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
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
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
LOFAR2.0
tango
Commits
074d741d
Commit
074d741d
authored
3 years ago
by
Taya Snijder
Browse files
Options
Downloads
Patches
Plain Diff
updated readme, changed arg in hdf5_explorer.py from --filename to --file
parent
52725aa1
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!114
fixed file writing bug by adding a thread and locks, added the ability to...
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
devices/statistics_writer/README.md
+7
-6
7 additions, 6 deletions
devices/statistics_writer/README.md
devices/statistics_writer/test/hdf5_explorer.py
+2
-2
2 additions, 2 deletions
devices/statistics_writer/test/hdf5_explorer.py
with
9 additions
and
8 deletions
devices/statistics_writer/README.md
+
7
−
6
View file @
074d741d
...
@@ -22,7 +22,7 @@ This script can be called with the following arguments:
...
@@ -22,7 +22,7 @@ This script can be called with the following arguments:
##HFD5 structure
##HFD5 structure
Statistics packets are collected
with
the StatisticsCollector in to a matrix. Once the matrix is done or a newer
Statistics packets are collected
by
the StatisticsCollector in to a matrix. Once the matrix is done or a newer
timestamp arrives this matrix along with the header of first packet header, nof_payload_errors and nof_valid_payloads.
timestamp arrives this matrix along with the header of first packet header, nof_payload_errors and nof_valid_payloads.
The file will be named after the mode it is in and the timestamp of the statistics packets. For example:
`SST_1970-01-01-00-00-00.h5`
.
The file will be named after the mode it is in and the timestamp of the statistics packets. For example:
`SST_1970-01-01-00-00-00.h5`
.
...
@@ -45,13 +45,14 @@ File
...
@@ -45,13 +45,14 @@ File
###explorer
###explorer
There is an hdf5 explorer that will walk through specified hdf5 files.
There is an hdf5 explorer that will walk through specified hdf5 files.
Its called
`hdf5_explorer.py`
and can be called with a file
name
argument
Its called
`hdf5_explorer.py`
and can be called with a
`--
file
`
argument
ex:
`python3 hdf5_explorer.py --file
name
data/SST_1970-01-01-00-00-00.h5`
This allows for easy manual checking
ex:
`python3 hdf5_explorer.py --file data/SST_1970-01-01-00-00-00.h5`
This allows for easy manual checking
of the structure and content of hdf5 files. useful for testing and debugging.
of the structure and content of hdf5 files. useful for testing and debugging.
Can also be used as example of how to read the HDF5 statistics data files.
Provides a number of example functions inside that go through the file in various ways.
###test server
###test server
There is a test server that will continuously send out the same statistics packet.
There is a test server that will continuously send out the same statistics packet.
Its called
`test_server.py`
. Takes
`host`
and
`port
`
as optional input arguments.
Its called
`test_server.py`
. Takes
`
--
host`
,
`--port`
and
`--file
`
as optional input arguments.
Defaults to address
`'127.0.0.1'`
and
port
`65433`
Defaults to address
`'127.0.0.1'`
,
port
`65433`
and file
`devices_test_SDP_SST_statistics_packets.bin`
This diff is collapsed.
Click to expand it.
devices/statistics_writer/test/hdf5_explorer.py
+
2
−
2
View file @
074d741d
...
@@ -4,7 +4,7 @@ import numpy
...
@@ -4,7 +4,7 @@ import numpy
import
argparse
import
argparse
parser
=
argparse
.
ArgumentParser
(
description
=
'
Select a file to explore
'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
Select a file to explore
'
)
parser
.
add_argument
(
'
--file
name
'
,
type
=
str
,
help
=
'
the name and path of the file
'
)
parser
.
add_argument
(
'
--file
'
,
type
=
str
,
help
=
'
the name and path of the file
'
)
import
logging
import
logging
logging
.
basicConfig
(
level
=
logging
.
INFO
)
logging
.
basicConfig
(
level
=
logging
.
INFO
)
...
@@ -112,7 +112,7 @@ class explorer:
...
@@ -112,7 +112,7 @@ class explorer:
# create a data dumper that creates a new file every 10s (for testing)
# create a data dumper that creates a new file every 10s (for testing)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
Explorer
=
explorer
(
args
.
file
name
)
Explorer
=
explorer
(
args
.
file
)
"""
"""
Print the entire files content
Print the entire files content
...
...
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