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
217e8b7f
Commit
217e8b7f
authored
3 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-574
: add calculate_HBAT_bf_delays test
parent
21a00c45
No related branches found
No related tags found
1 merge request
!234
Resolve L2SS-574 "Move hbat code to recv"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/test/devices/test_recv_device.py
+12
-1
12 additions, 1 deletion
...trol/tangostationcontrol/test/devices/test_recv_device.py
with
12 additions
and
1 deletion
tangostationcontrol/tangostationcontrol/test/devices/test_recv_device.py
+
12
−
1
View file @
217e8b7f
...
...
@@ -8,11 +8,12 @@
# See LICENSE.txt for more info.
from
tango.test_context
import
DeviceTestContext
from
tango
import
DeviceProxy
from
tango
import
DeviceProxy
,
DevState
from
tangostationcontrol.devices
import
recv
,
lofar_device
import
mock
import
numpy
from
tangostationcontrol.test
import
base
...
...
@@ -34,8 +35,10 @@ class TestRecvDevice(base.TestCase):
def
init_device
(
self
,
proxy
:
DeviceProxy
):
proxy
.
off
()
proxy
.
initialise
()
self
.
assertEqual
(
DevState
.
STANDBY
,
proxy
.
state
())
proxy
.
set_defaults
()
proxy
.
on
()
self
.
assertEqual
(
DevState
.
ON
,
proxy
.
state
())
def
test_get_hbat_bf_delay_step_delays
(
self
):
"""
Verify can read delay step attribute and length matches without err
"""
...
...
@@ -60,3 +63,11 @@ class TestRecvDevice(base.TestCase):
with
DeviceTestContext
(
recv
.
RECV
,
properties
=
self
.
recv_properties
,
process
=
True
)
as
proxy
:
self
.
init_device
(
proxy
)
self
.
assertEqual
(
3072
,
len
(
proxy
.
get_hbat_signal_input_delays
()))
# 96x32=3072
def
test_calculate_HBAT_bf_delays
(
self
):
"""
Verify HBAT beamforming calculations are correctly executed
"""
with
DeviceTestContext
(
recv
.
RECV
,
properties
=
self
.
recv_properties
,
process
=
True
)
as
proxy
:
self
.
init_device
(
proxy
)
delays
=
numpy
.
random
.
rand
(
96
,
16
).
flatten
()
HBAT_bf_delays
=
proxy
.
calculate_HBAT_bf_delays
(
delays
)
self
.
assertEqual
(
3072
,
len
(
HBAT_bf_delays
))
# 96x32=3072
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