Skip to content
Snippets Groups Projects
Commit 074d741d authored by Taya Snijder's avatar Taya Snijder
Browse files

updated readme, changed arg in hdf5_explorer.py from --filename to --file

parent 52725aa1
Branches
Tags
1 merge request!114fixed file writing bug by adding a thread and locks, added the ability to...
...@@ -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 filename argument Its called `hdf5_explorer.py` and can be called with a `--file` argument
ex: `python3 hdf5_explorer.py --filename 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`
...@@ -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('--filename', 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.filename) Explorer = explorer(args.file)
""" """
Print the entire files content Print the entire files content
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment