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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
6e81fe91
Commit
6e81fe91
authored
2 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-871
: fix writer bugs
parent
c6fcb1cf
No related branches found
No related tags found
1 merge request
!407
Resolve L2SS-871 "update-hdf5-writer"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tangostationcontrol/tangostationcontrol/statistics/reader.py
+5
-1
5 additions, 1 deletion
tangostationcontrol/tangostationcontrol/statistics/reader.py
tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py
+2
-2
2 additions, 2 deletions
...tioncontrol/tangostationcontrol/statistics/writer/hdf5.py
with
7 additions
and
3 deletions
tangostationcontrol/tangostationcontrol/statistics/reader.py
+
5
−
1
View file @
6e81fe91
...
...
@@ -156,7 +156,7 @@ class statistics_data:
# we will be creating potentially tens of thousands of these object. Using __slots__ makes them faster and uses less memory. At the cost of
# having to list all self attributes here.
__slots__
=
(
"
version_id
"
,
"
timestamp
"
,
"
station_id
"
,
"
source_info_t_adc
"
,
"
source_info_subband_calibrated_flag
"
,
"
source_info_payload_error
"
,
__slots__
=
(
"
version_id
"
,
"
station_version_id
"
,
"
writer_version_id
"
,
"
timestamp
"
,
"
station_id
"
,
"
source_info_t_adc
"
,
"
source_info_subband_calibrated_flag
"
,
"
source_info_payload_error
"
,
"
source_info_payload_error
"
,
"
source_info_payload_error
"
,
"
source_info_nyquist_zone_index
"
,
"
source_info_gn_index
"
,
"
source_info_fsub_type
"
,
"
source_info_beam_repositioning_flag
"
,
"
source_info_antenna_band_index
"
,
"
source_info__raw
"
,
"
observation_id
"
,
"
nof_statistics_per_packet
"
,
"
nof_signal_inputs
"
,
"
nof_bytes_per_statistic
"
,
"
marker
"
,
"
integration_interval_raw
"
,
...
...
@@ -170,6 +170,10 @@ class statistics_data:
self
.
version_id
=
file
[
group_key
].
attrs
[
"
version_id
"
]
self
.
station_id
=
file
[
group_key
].
attrs
[
"
station_id
"
]
# get software version info
self
.
station_version_id
=
file
[
group_key
].
attrs
[
"
station_version_id
"
]
self
.
writer_version_id
=
file
[
group_key
].
attrs
[
"
writer_version_id
"
]
# convert string timestamp to datetime object
self
.
timestamp
=
datetime
.
datetime
.
fromisoformat
(
file
[
group_key
].
attrs
[
"
timestamp
"
])
...
...
This diff is collapsed.
Click to expand it.
tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py
+
2
−
2
View file @
6e81fe91
...
...
@@ -36,14 +36,14 @@ __all__ = [
def
_get_lsc_version
()
->
str
:
"""
Retrieve the Lofar Station Control software version
"""
filepath
=
os
.
path
.
join
(
os
.
environ
.
get
(
'
LOFAR20_DIR
'
),
'
tangostationcontrol/VERSION
'
)
filepath
=
os
.
path
.
join
(
os
.
path
.
realpath
(
'
../
'
),
'
tangostationcontrol/VERSION
'
)
with
open
(
filepath
)
as
f
:
version
=
f
.
readline
().
strip
()
return
version
or
""
def
_get_writer_version
()
->
str
:
"""
Retrieve the Statistics Writer software version
"""
filepath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
/
VERSION
'
)
filepath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
VERSION
'
)
with
open
(
filepath
)
as
f
:
version
=
f
.
readline
().
strip
()
return
version
or
""
...
...
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