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
8f5dc937
Commit
8f5dc937
authored
2 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-1010
: Deal with unconnected antennas
parent
fab0b850
No related branches found
No related tags found
1 merge request
!473
L2SS-1010: Deal with unconnected antennas
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/devices/antennafield.py
+22
-1
22 additions, 1 deletion
...tationcontrol/tangostationcontrol/devices/antennafield.py
with
22 additions
and
1 deletion
tangostationcontrol/tangostationcontrol/devices/antennafield.py
+
22
−
1
View file @
8f5dc937
...
...
@@ -392,7 +392,15 @@ class AntennaField(lofar_device):
def
read_Antenna_Cables_Loss_R
(
self
):
rcu_bands
=
self
.
read_attribute
(
"
RCU_band_select_RW
"
)
return
numpy
.
array
([
cable_types
[
antenna
].
get_loss
(
self
.
Antenna_Type
,
rcu_band
)
for
antenna
,
rcu_band
in
zip
(
self
.
Antenna_Cables
,
rcu_bands
)])
control_to_recv_mapping
=
numpy
.
array
(
self
.
Control_to_RECV_mapping
).
reshape
(
-
1
,
2
)
recvs
=
control_to_recv_mapping
[:,
0
]
# first column is RECV device number
# Unconnected antennas return RCU band 0, which does not exist. Return 0 loss for them instead.
return
numpy
.
array
([
cable_types
[
cable
].
get_loss
(
self
.
Antenna_Type
,
rcu_band
)
if
recv
>
0
else
0
for
recv
,
cable
,
rcu_band
in
zip
(
recvs
,
self
.
Antenna_Cables
,
rcu_bands
)])
def
read_Calibration_SDP_Signal_Input_Samples_Delay_R
(
self
):
# Correct for signal delays in the cables
...
...
@@ -450,10 +458,23 @@ class AntennaField(lofar_device):
rcu_bands
=
self
.
read_attribute
(
"
RCU_band_select_RW
"
)
control_to_recv_mapping
=
numpy
.
array
(
self
.
Control_to_RECV_mapping
).
reshape
(
-
1
,
2
)
recvs
=
control_to_recv_mapping
[:,
0
]
# first column is RECV device number
antenna_to_sdp_mapping
=
self
.
read_attribute
(
"
Antenna_to_SDP_Mapping_R
"
)
# construct the subband weights based on the rcu_band of each antenna,
# combining the relevant tables.
subband_weights
=
numpy
.
zeros
((
self
.
read_attribute
(
"
nr_antennas_R
"
),
3
),
dtype
=
numpy
.
float64
)
for
antenna_nr
,
rcu_band
in
enumerate
(
rcu_bands
):
# Skip antennas not connected to RECV. These do not have a valid RCU band selected.
if
recvs
[
antenna_nr
]
==
0
:
continue
# Skip antennas not connected to SDP. They must retain a weight of 0.
if
antenna_to_sdp_mapping
[
antenna_nr
,
1
]
==
-
1
:
continue
subband_weights
[
antenna_nr
,
:]
=
rcu_band_to_caltable
[
rcu_band
][
antenna_nr
,
:]
return
subband_weights
...
...
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