Skip to content
GitLab
Explore
Sign in
Register
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
edb94c28
Commit
edb94c28
authored
3 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-436
: Fix block_index calculation, and use derived baseline based instead of original one.
parent
7dbb2c48
No related branches found
No related tags found
1 merge request
!149
L2SS-436: Conjugate XSTs if they are from the other triangle of the matrix...
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
devices/devices/sdp/statistics_collector.py
+2
-5
2 additions, 5 deletions
devices/devices/sdp/statistics_collector.py
with
2 additions
and
5 deletions
devices/devices/sdp/statistics_collector.py
+
2
−
5
View file @
edb94c28
...
@@ -165,7 +165,7 @@ class XSTCollector(StatisticsCollector):
...
@@ -165,7 +165,7 @@ class XSTCollector(StatisticsCollector):
raise
ValueError
(
"
Packet describes baselines starting at %s, but we require a multiple of BLOCK_LENGTH=%d
"
%
(
fields
.
first_baseline
,
self
.
MAX_INPUTS
))
raise
ValueError
(
"
Packet describes baselines starting at %s, but we require a multiple of BLOCK_LENGTH=%d
"
%
(
fields
.
first_baseline
,
self
.
MAX_INPUTS
))
# Make sure we always have a baseline (a,b) with a>=b. If not, we swap the indices and mark that the data must be conjugated when processed.
# Make sure we always have a baseline (a,b) with a>=b. If not, we swap the indices and mark that the data must be conjugated when processed.
first_baseline
=
fields
.
first_baseline
[
antenna
]
first_baseline
=
fields
.
first_baseline
if
first_baseline
[
0
]
<
first_baseline
[
1
]:
if
first_baseline
[
0
]
<
first_baseline
[
1
]:
conjugated
=
True
conjugated
=
True
first_baseline
=
(
first_baseline
[
1
],
first_baseline
[
0
])
first_baseline
=
(
first_baseline
[
1
],
first_baseline
[
0
])
...
@@ -177,13 +177,10 @@ class XSTCollector(StatisticsCollector):
...
@@ -177,13 +177,10 @@ class XSTCollector(StatisticsCollector):
#
#
# we honour this format, as we want to keep the metadata together with these blocks. we do need to put the blocks in a linear
# we honour this format, as we want to keep the metadata together with these blocks. we do need to put the blocks in a linear
# and tight order, however, so we calculate a block index.
# and tight order, however, so we calculate a block index.
block_index
=
baseline_index
(
fields
.
first_baseline
[
0
]
//
self
.
BLOCK_LENGTH
,
fields
.
first_baseline
[
1
]
//
self
.
BLOCK_LENGTH
)
block_index
=
baseline_index
(
first_baseline
[
0
]
//
self
.
BLOCK_LENGTH
,
first_baseline
[
1
]
//
self
.
BLOCK_LENGTH
)
# process the packet
# process the packet
self
.
parameters
[
"
nof_valid_payloads
"
][
fields
.
gn_index
]
+=
numpy
.
uint64
(
1
)
self
.
parameters
[
"
nof_valid_payloads
"
][
fields
.
gn_index
]
+=
numpy
.
uint64
(
1
)
block_index
=
baseline_index
(
fields
.
first_baseline
[
0
],
fields
.
first_baseline
[
1
])
self
.
parameters
[
"
xst_blocks
"
][
block_index
][:
fields
.
nof_statistics_per_packet
]
=
fields
.
payload
self
.
parameters
[
"
xst_blocks
"
][
block_index
][:
fields
.
nof_statistics_per_packet
]
=
fields
.
payload
self
.
parameters
[
"
xst_timestamps
"
][
block_index
]
=
numpy
.
float64
(
fields
.
timestamp
().
timestamp
())
self
.
parameters
[
"
xst_timestamps
"
][
block_index
]
=
numpy
.
float64
(
fields
.
timestamp
().
timestamp
())
self
.
parameters
[
"
xst_conjugated
"
][
block_index
]
=
conjugated
self
.
parameters
[
"
xst_conjugated
"
][
block_index
]
=
conjugated
...
...
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