Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
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
Container Registry
Model registry
Operate
Environments
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
RTSD
HDL
Commits
603a594f
Commit
603a594f
authored
6 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Added rdPayload and derived nonZeroTp from that.
parent
e3997c7b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/apertif/commissioning/tests/verify_correlator_db_output.py
+25
-4
25 additions, 4 deletions
...pertif/commissioning/tests/verify_correlator_db_output.py
with
25 additions
and
4 deletions
applications/apertif/commissioning/tests/verify_correlator_db_output.py
+
25
−
4
View file @
603a594f
...
@@ -37,12 +37,14 @@
...
@@ -37,12 +37,14 @@
# -v 0, 1, 2 or 3 for regression test
# -v 0, 1, 2 or 3 for regression test
# At central correlator verify expected result via DB
# At central correlator verify expected result via DB
> python $RADIOHDL/applications/apertif/commissioning/main.py --app apertif-dev --tel a --pol 0,1 --unb 0,1
> python $RADIOHDL/applications/apertif/commissioning/tests/verify_correlator_db_output.py -v 3 --tel a --unb 0 --fn 0:3 --bn 0:3 --beamlets 0 --channels 0
> python $RADIOHDL/applications/apertif/commissioning/tests/verify_correlator_db_output.py -v 3 --tel a --unb 0 --fn 0:3 --bn 0:3 --beamlets 0 --channels 0
"""
"""
###############################################################################
###############################################################################
# System imports
# System imports
import
sys
import
sys
import
operator
import
common
as
cm
import
common
as
cm
import
test_case
import
test_case
import
node_io
import
node_io
...
@@ -269,7 +271,13 @@ for bui in beamlets:
...
@@ -269,7 +271,13 @@ for bui in beamlets:
###################################################################
###################################################################
# Verify payload data
# Verify payload data
#
# A visibility packet contains all N_vis = 300 visibilities for one (beamlet, channel):
# - The visibilities for which at least one TP is inactive must be zero, because for those TP the
# firmware forces the data to zero.
# - If both TP in a visibility are active, then the visibility can be non-zero. The visibility
# can still be zero if the BF weights for the corresponding beamlet are zero.
#
# Visibility (col, row) indices for
# Visibility (col, row) indices for
# 0 vis (0,0)
# 0 vis (0,0)
# 1 vis (0,1) 24 vis (1,1)
# 1 vis (0,1) 24 vis (1,1)
...
@@ -280,9 +288,22 @@ for bui in beamlets:
...
@@ -280,9 +288,22 @@ for bui in beamlets:
#
#
# 24 + 23 + 22 ... + 1 = 300 visibilities
# 24 + 23 + 22 ... + 1 = 300 visibilities
#
#
# The visibilities are stored in two 32b words: real, imag, so in total 600 words.
# The visibilities are stored in two 32b words: real, imag, so in total 600 words payload.
#
rdPayload
=
rdData
[
corrPacketInfo
.
vis_header_size
:
corrPacketInfo
.
vis_header_size
+
N_vis
*
cm
.
c_nof_complex
]
#
rdVisibilities
=
[]
even
=
True
for
data
in
rdPayload
:
if
even
:
visReal
=
cm
.
to_signed
(
data
)
else
:
visImag
=
cm
.
to_signed
(
data
)
rdVisibilities
.
append
(
complex
(
visReal
,
visImag
))
# Find the TP for all read visibilities that are non-zero
nonZeroVisibilities
=
cm
.
find_indices_where_value_ne
(
rdVisibilities
,
0
)
nonZeroTpPairs
=
visibilities_to_tp_pairs
(
nonZeroVisibilities
)
nonZeroTp
=
tp_pairs_to_active_tp
(
tpPairs
)
tc
.
append_log
(
tc
.
V_INFO_DETAILS
,
reportStr
+
'
Non zero TP = %s
'
%
nonZeroTp
)
###############################################################################
###############################################################################
# End
# End
...
...
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