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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
2f55cbb0
Commit
2f55cbb0
authored
3 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-574
: move reference and antenna positions to RECV
parent
700df905
No related branches found
No related tags found
1 merge request
!234
Resolve L2SS-574 "Move hbat code to recv"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tangostationcontrol/tangostationcontrol/devices/beam.py
+7
-14
7 additions, 14 deletions
tangostationcontrol/tangostationcontrol/devices/beam.py
tangostationcontrol/tangostationcontrol/devices/recv.py
+27
-2
27 additions, 2 deletions
tangostationcontrol/tangostationcontrol/devices/recv.py
with
34 additions
and
16 deletions
tangostationcontrol/tangostationcontrol/devices/beam.py
+
7
−
14
View file @
2f55cbb0
...
...
@@ -36,18 +36,6 @@ class Beam(lofar_device):
# -----------------
# Device Properties
# -----------------
reference_itrf
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
default_value
=
numpy
.
tile
(
numpy
.
array
([
3826577.066
,
461022.948
,
5064892.786
]),(
96
,
1
))
# CS002LBA, in ITRF2005 timestamp 2012.5
)
antenna_itrf
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
default_value
=
numpy
.
tile
(
numpy
.
array
([
3826923.546
,
460915.441
,
5064643.489
]),(
96
,
16
,
1
))
# CS001LBA, in ITRF2005 timestamp 2012.5
)
HBAT_signal_input_delays
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
...
...
@@ -83,6 +71,10 @@ class Beam(lofar_device):
# Set a reference of RECV device
self
.
recv_proxy
=
DeviceProxy
(
"
STAT/RECV/1
"
)
# Retrieve positions from RECV device
self
.
hbat_reference_itrf
=
self
.
recv_proxy
.
get_hbat_reference_itrf
().
reshape
(
96
,
3
)
self
.
hbat_antenna_itrf
=
self
.
recv_proxy
.
get_hbat_antenna_itrf
().
reshape
(
96
,
16
,
3
)
# --------
# internal functions
# --------
...
...
@@ -97,11 +89,11 @@ class Beam(lofar_device):
for
tile
in
range
(
96
):
# initialise delay calculator
d
=
delay_calculator
(
self
.
reference_itrf
[
tile
])
d
=
delay_calculator
(
self
.
hbat_
reference_itrf
[
tile
])
d
.
set_measure_time
(
timestamp
)
# calculate the delays based on the set reference position, the set time and now the set direction and antenna positions
delays
[
tile
]
=
d
.
convert
(
pointing_direction
[
tile
],
self
.
antenna_itrf
[
tile
])
delays
[
tile
]
=
d
.
convert
(
pointing_direction
[
tile
],
self
.
hbat_
antenna_itrf
[
tile
])
return
delays
...
...
@@ -206,6 +198,7 @@ class Beam(lofar_device):
"""
Uploads beam weights based on a given pointing direction 2D array (96 tiles x 3 parameters)
"""
# Reshape the flatten input array
pointing_direction
=
numpy
.
array
(
pointing_direction
).
reshape
(
96
,
3
)
self
.
_HBAT_set_pointing
(
pointing_direction
,
timestamp
)
...
...
This diff is collapsed.
Click to expand it.
tangostationcontrol/tangostationcontrol/devices/recv.py
+
27
−
2
View file @
2f55cbb0
...
...
@@ -15,7 +15,7 @@
from
tango
import
DebugIt
from
tango.server
import
command
from
tango.server
import
device_property
,
attribute
from
tango
import
AttrWriteType
,
DevState
from
tango
import
AttrWriteType
,
DevState
,
DevVarFloatArray
import
numpy
# Additional import
...
...
@@ -47,7 +47,6 @@ class RECV(opcua_device):
# -----------------
# Device Properties
# -----------------
ANT_mask_RW_default
=
device_property
(
dtype
=
'
DevVarBooleanArray
'
,
mandatory
=
False
,
...
...
@@ -75,6 +74,18 @@ class RECV(opcua_device):
# ],dtype=numpy.float64)
# )
hbat_reference_itrf
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
default_value
=
numpy
.
tile
(
numpy
.
array
([
3826577.066
,
461022.948
,
5064892.786
]),(
96
,
1
))
# CS002LBA, in ITRF2005 timestamp 2012.5
)
hbat_antenna_itrf
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
default_value
=
numpy
.
tile
(
numpy
.
array
([
3826923.546
,
460915.441
,
5064643.489
]),(
96
,
16
,
1
))
# CS001LBA, in ITRF2005 timestamp 2012.5
)
first_default_settings
=
[
# set the masks first, as those filter any subsequent settings
'
ANT_mask_RW
'
,
...
...
@@ -143,6 +154,20 @@ class RECV(opcua_device):
# --------
# Commands
# --------
@command
(
dtype_out
=
DevVarFloatArray
)
@DebugIt
()
@only_in_states
([
DevState
.
ON
])
def
get_hbat_reference_itrf
(
self
):
"""
Return the property hbat_reference_itrf (96x3) into a flatten array
"""
return
self
.
hbat_reference_itrf
.
flatten
()
@command
(
dtype_out
=
DevVarFloatArray
)
@DebugIt
()
@only_in_states
([
DevState
.
ON
])
def
get_hbat_antenna_itrf
(
self
):
"""
Return the property hbat_antenna_itrf (96x16x3) into a flatten array
"""
return
self
.
hbat_antenna_itrf
.
flatten
()
@command
()
@DebugIt
()
@only_in_states
([
DevState
.
STANDBY
,
DevState
.
ON
])
...
...
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