Skip to content
GitLab
Explore
Sign in
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
e55ff6e0
Commit
e55ff6e0
authored
2 years ago
by
Taya Snijder
Browse files
Options
Downloads
Patches
Plain Diff
polished the code a bit
parent
2a5cd492
No related branches found
No related tags found
1 merge request
!421
Resolve L2SS-920 "Make statistics writer tolerant"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tangostationcontrol/tangostationcontrol/statistics/reader.py
+4
-9
4 additions, 9 deletions
tangostationcontrol/tangostationcontrol/statistics/reader.py
tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py
+0
-3
0 additions, 3 deletions
...tioncontrol/tangostationcontrol/statistics/writer/hdf5.py
with
4 additions
and
12 deletions
tangostationcontrol/tangostationcontrol/statistics/reader.py
+
4
−
9
View file @
e55ff6e0
...
@@ -198,9 +198,10 @@ class statistics_data:
...
@@ -198,9 +198,10 @@ class statistics_data:
# get SST specific stuff
# get SST specific stuff
if
self
.
marker
==
"
S
"
:
if
self
.
marker
==
"
S
"
:
logger
.
debug
(
f
"
rcu_attenuator_dB:
{
file
.
get
(
f
'
{
group_key
}
/
rcu_attenuator_dB
'
)
}
"
)
logger
.
debug
(
f
"
rcu_band_select:
{
file
.
get
(
f
'
{
group_key
}
/
rcu_band_select
'
)
}
"
)
self
.
data_id_signal_input_index
=
file
[
group_key
].
attrs
[
"
data_id_signal_input_index
"
]
logger
.
debug
(
f
"
rcu_dth_on is:
{
file
.
get
(
f
'
{
group_key
}
/
rcu_dth_on
'
)
}
"
)
# check if the dataset is empty or not. if empty, set to None, if not get the value
if
file
.
get
(
f
'
{
group_key
}
/rcu_attenuator_dB
'
).
shape
is
None
:
if
file
.
get
(
f
'
{
group_key
}
/rcu_attenuator_dB
'
).
shape
is
None
:
self
.
rcu_attenuator_dB
=
None
self
.
rcu_attenuator_dB
=
None
...
@@ -217,12 +218,6 @@ class statistics_data:
...
@@ -217,12 +218,6 @@ class statistics_data:
else
:
else
:
self
.
rcu_dth_on
=
numpy
.
array
(
file
.
get
(
f
"
{
group_key
}
/rcu_dth_on
"
))
self
.
rcu_dth_on
=
numpy
.
array
(
file
.
get
(
f
"
{
group_key
}
/rcu_dth_on
"
))
self
.
data_id_signal_input_index
=
file
[
group_key
].
attrs
[
"
data_id_signal_input_index
"
]
# self.rcu_attenuator_dB = numpy.array(file.get(f"{group_key}/rcu_attenuator_dB"))
# self.rcu_band_select = numpy.array(file.get(f"{group_key}/rcu_band_select"))
# self.rcu_dth_on = numpy.array(file.get(f"{group_key}/rcu_dth_on"))
# get XST specific stuff
# get XST specific stuff
if
self
.
marker
==
"
X
"
:
if
self
.
marker
==
"
X
"
:
self
.
data_id_subband_index
=
file
[
group_key
].
attrs
[
"
data_id_subband_index
"
]
self
.
data_id_subband_index
=
file
[
group_key
].
attrs
[
"
data_id_subband_index
"
]
...
...
This diff is collapsed.
Click to expand it.
tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py
+
0
−
3
View file @
e55ff6e0
...
@@ -318,7 +318,6 @@ class SstHdf5Writer(HDF5Writer):
...
@@ -318,7 +318,6 @@ class SstHdf5Writer(HDF5Writer):
compression
=
"
gzip
"
,
compression
=
"
gzip
"
,
)
)
except
AttributeError
:
except
AttributeError
:
logger
.
debug
(
"
set rcu_attenuator_dB_data to None
"
)
current_group
.
create_dataset
(
current_group
.
create_dataset
(
name
=
"
rcu_attenuator_dB
"
,
name
=
"
rcu_attenuator_dB
"
,
data
=
h5py
.
Empty
(
"
f
"
),
data
=
h5py
.
Empty
(
"
f
"
),
...
@@ -331,7 +330,6 @@ class SstHdf5Writer(HDF5Writer):
...
@@ -331,7 +330,6 @@ class SstHdf5Writer(HDF5Writer):
compression
=
"
gzip
"
,
compression
=
"
gzip
"
,
)
)
except
AttributeError
:
except
AttributeError
:
logger
.
debug
(
"
set rcu_band_select_data to None
"
)
current_group
.
create_dataset
(
current_group
.
create_dataset
(
name
=
"
rcu_band_select
"
,
name
=
"
rcu_band_select
"
,
data
=
h5py
.
Empty
(
"
f
"
),
data
=
h5py
.
Empty
(
"
f
"
),
...
@@ -344,7 +342,6 @@ class SstHdf5Writer(HDF5Writer):
...
@@ -344,7 +342,6 @@ class SstHdf5Writer(HDF5Writer):
compression
=
"
gzip
"
,
compression
=
"
gzip
"
,
)
)
except
AttributeError
:
except
AttributeError
:
logger
.
debug
(
"
set rcu_dth_on to None
"
)
current_group
.
create_dataset
(
current_group
.
create_dataset
(
name
=
"
rcu_dth_on
"
,
name
=
"
rcu_dth_on
"
,
data
=
h5py
.
Empty
(
"
f
"
),
data
=
h5py
.
Empty
(
"
f
"
),
...
...
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