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
3b06aff6
Commit
3b06aff6
authored
2 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-984
: add further digitalbeam integration tests
parent
78599197
No related branches found
No related tags found
1 merge request
!440
Resolve L2SS-984 "Fix beamlet subband tests"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py
+63
-8
63 additions, 8 deletions
...tegration_test/default/devices/test_device_digitalbeam.py
with
63 additions
and
8 deletions
tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py
+
63
−
8
View file @
3b06aff6
...
@@ -14,6 +14,7 @@ from tangostationcontrol.devices.antennafield import AntennaQuality, AntennaUse
...
@@ -14,6 +14,7 @@ from tangostationcontrol.devices.antennafield import AntennaQuality, AntennaUse
from
.base
import
AbstractTestBases
from
.base
import
AbstractTestBases
import
numpy
import
numpy
import
time
class
TestDeviceDigitalBeam
(
AbstractTestBases
.
TestDeviceBase
):
class
TestDeviceDigitalBeam
(
AbstractTestBases
.
TestDeviceBase
):
...
@@ -34,7 +35,7 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
...
@@ -34,7 +35,7 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
recv_iden
)
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
recv_iden
)
self
.
recv_proxy
=
self
.
setup_recv_proxy
()
self
.
recv_proxy
=
self
.
setup_recv_proxy
()
self
.
beamlet_proxy
=
self
.
setup
_beamlet_proxy
()
self
.
beamlet_proxy
=
self
.
initialise
_beamlet_proxy
()
def
setup_recv_proxy
(
self
):
def
setup_recv_proxy
(
self
):
recv_proxy
=
TestDeviceProxy
(
self
.
recv_iden
)
recv_proxy
=
TestDeviceProxy
(
self
.
recv_iden
)
...
@@ -43,6 +44,12 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
...
@@ -43,6 +44,12 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
recv_proxy
.
set_defaults
()
recv_proxy
.
set_defaults
()
return
recv_proxy
return
recv_proxy
def
initialise_beamlet_proxy
(
self
):
beamlet_proxy
=
TestDeviceProxy
(
self
.
beamlet_iden
)
beamlet_proxy
.
off
()
beamlet_proxy
.
initialise
()
return
beamlet_proxy
def
setup_beamlet_proxy
(
self
):
def
setup_beamlet_proxy
(
self
):
beamlet_proxy
=
TestDeviceProxy
(
self
.
beamlet_iden
)
beamlet_proxy
=
TestDeviceProxy
(
self
.
beamlet_iden
)
beamlet_proxy
.
off
()
beamlet_proxy
.
off
()
...
@@ -73,19 +80,22 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
...
@@ -73,19 +80,22 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
antennafield_proxy
.
boot
()
antennafield_proxy
.
boot
()
return
antennafield_proxy
return
antennafield_proxy
def
test_pointing_to_zenith
(
self
):
def
test_pointing_to_zenith_clock_change
(
self
):
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
beamlet_iden
)
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
sdp_iden
)
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
sdp_iden
)
self
.
addCleanup
(
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
antennafield_iden
TestDeviceProxy
.
test_device_turn_off
,
self
.
antennafield_iden
)
)
self
.
setup_antennafield_proxy
(
self
.
antenna_qualities_ok
,
self
.
antenna_use_ok
)
self
.
setup_antennafield_proxy
(
self
.
antenna_qualities_ok
,
self
.
antenna_use_ok
)
self
.
setup_sdp_proxy
()
self
.
sdp_proxy
=
self
.
setup_sdp_proxy
()
self
.
beamlet_proxy
=
self
.
initialise_beamlet_proxy
()
self
.
beamlet_proxy
.
on
()
# TODO(Corne): Update these and ensure their effects is asserted in tests L2SS-984
# Set first (default) clock configuration
# Setup beamlet configuration
self
.
sdp_proxy
.
clock_RW
=
200
*
1000000
# self.beamlet_proxy.clock_RW = 200 * 1000000
time
.
sleep
(
1
)
# self.beamlet_proxy.subband_select_RW = list(range(488))
self
.
proxy
.
initialise
()
self
.
proxy
.
initialise
()
self
.
proxy
.
Tracking_enabled_RW
=
False
self
.
proxy
.
Tracking_enabled_RW
=
False
...
@@ -95,7 +105,52 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
...
@@ -95,7 +105,52 @@ class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase):
self
.
proxy
.
set_pointing
(
numpy
.
array
([[
"
AZELGEO
"
,
"
0deg
"
,
"
90deg
"
]]
*
488
).
flatten
())
self
.
proxy
.
set_pointing
(
numpy
.
array
([[
"
AZELGEO
"
,
"
0deg
"
,
"
90deg
"
]]
*
488
).
flatten
())
# beam weights should now be non-zero, we don't actually check their values for correctness
# beam weights should now be non-zero, we don't actually check their values for correctness
self
.
assertNotEqual
(
0
,
sum
(
self
.
beamlet_proxy
.
FPGA_bf_weights_xx_yy_RW
.
flatten
()))
FPGA_bf_weights_xx_yy_clock200
=
self
.
beamlet_proxy
.
FPGA_bf_weights_xx_yy_RW
.
flatten
()
self
.
assertNotEqual
(
0
,
sum
(
FPGA_bf_weights_xx_yy_clock200
))
self
.
beamlet_proxy
=
self
.
initialise_beamlet_proxy
()
self
.
beamlet_proxy
.
on
()
# Change clock configuration
self
.
sdp_proxy
.
clock_RW
=
160
*
1000000
time
.
sleep
(
1
)
FPGA_bf_weights_xx_yy_clock160
=
self
.
beamlet_proxy
.
FPGA_bf_weights_xx_yy_RW
.
flatten
()
# Assert some values are different
self
.
assertNotEqual
(
sum
(
FPGA_bf_weights_xx_yy_clock160
),
sum
(
FPGA_bf_weights_xx_yy_clock200
))
def
test_pointing_to_zenith_subband_change
(
self
):
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
beamlet_iden
)
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
sdp_iden
)
self
.
addCleanup
(
TestDeviceProxy
.
test_device_turn_off
,
self
.
antennafield_iden
)
self
.
setup_antennafield_proxy
(
self
.
antenna_qualities_ok
,
self
.
antenna_use_ok
)
self
.
sdp_proxy
=
self
.
setup_sdp_proxy
()
self
.
beamlet_proxy
=
self
.
initialise_beamlet_proxy
()
self
.
beamlet_proxy
.
subband_select_RW
=
numpy
.
array
(
list
(
range
(
317
))
+
[
316
]
+
list
(
range
(
318
,
488
)),
dtype
=
numpy
.
uint32
)
self
.
beamlet_proxy
.
on
()
self
.
proxy
.
initialise
()
self
.
proxy
.
Tracking_enabled_RW
=
False
self
.
proxy
.
on
()
# Point to Zenith
self
.
proxy
.
set_pointing
(
numpy
.
array
([[
"
AZELGEO
"
,
"
0deg
"
,
"
90deg
"
]]
*
488
).
flatten
())
# Store values with first subband configuration
FPGA_bf_weights_xx_yy_subband_v1
=
self
.
beamlet_proxy
.
FPGA_bf_weights_xx_yy_RW
.
flatten
()
# Restart beamlet proxy
self
.
beamlet_proxy
=
self
.
initialise_beamlet_proxy
()
self
.
beamlet_proxy
.
subband_select_RW
=
[
317
]
*
488
self
.
beamlet_proxy
.
on
()
# Store values with second subband configuration
FPGA_bf_weights_xx_yy_subband_v2
=
self
.
beamlet_proxy
.
FPGA_bf_weights_xx_yy_RW
.
flatten
()
# Assert some values are different
self
.
assertNotEqual
(
sum
(
FPGA_bf_weights_xx_yy_subband_v1
),
sum
(
FPGA_bf_weights_xx_yy_subband_v2
))
def
test_set_pointing_masked_enable
(
self
):
def
test_set_pointing_masked_enable
(
self
):
"""
Verify that only selected inputs are written
"""
"""
Verify that only selected inputs are written
"""
...
...
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