Skip to content
Snippets Groups Projects
Commit d1463d21 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-984 add subband and clock change test

parent 3e4b4fc1
No related branches found
No related tags found
1 merge request!440Resolve L2SS-984 "Fix beamlet subband tests"
...@@ -85,8 +85,7 @@ class TestDeviceBeamlet(AbstractTestBases.TestDeviceBase): ...@@ -85,8 +85,7 @@ class TestDeviceBeamlet(AbstractTestBases.TestDeviceBase):
sdp_proxy = self.setup_sdp() sdp_proxy = self.setup_sdp()
self.proxy.initialise() self.proxy.initialise()
# TODO(Corne): Update test so effects of attribute are asserted L2SS-984 self.proxy.subband_select_RW = numpy.array(list(range(317)) + [316] + list(range(318,488)), dtype=numpy.uint32)
# self.proxy.subband_select_RW = list(range(488))
self.proxy.on() self.proxy.on()
# any non-zero delay should result in different weights for different clocks # any non-zero delay should result in different weights for different clocks
...@@ -108,3 +107,16 @@ class TestDeviceBeamlet(AbstractTestBases.TestDeviceBase): ...@@ -108,3 +107,16 @@ class TestDeviceBeamlet(AbstractTestBases.TestDeviceBase):
self.assertTrue((calculated_bf_weights_200 != calculated_bf_weights_160).all()) self.assertTrue((calculated_bf_weights_200 != calculated_bf_weights_160).all())
self.assertTrue((calculated_bf_weights_200 == calculated_bf_weights_200_v2).all()) self.assertTrue((calculated_bf_weights_200 == calculated_bf_weights_200_v2).all())
# change subbands
self.proxy.off()
self.proxy.initialise()
self.proxy.subband_select_RW = [317] * 488
self.proxy.on()
calculated_bf_weights_200_v3 = self.proxy.calculate_bf_weights(delays.flatten())
self.assertTrue((calculated_bf_weights_200_v2 != calculated_bf_weights_200_v3).all())
sdp_proxy.clock_RW = 160 * 1000000
time.sleep(1) # wait for beamlet device to process change event
calculated_bf_weights_160_v2 = self.proxy.calculate_bf_weights(delays.flatten())
self.assertTrue((calculated_bf_weights_160 != calculated_bf_weights_160_v2).all())
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment