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
03c4d25e
Commit
03c4d25e
authored
3 years ago
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-574
: move signal-input-delays to RECV
parent
2f55cbb0
No related branches found
No related tags found
1 merge request
!234
Resolve L2SS-574 "Move hbat code to recv"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tangostationcontrol/tangostationcontrol/devices/beam.py
+6
-9
6 additions, 9 deletions
tangostationcontrol/tangostationcontrol/devices/beam.py
tangostationcontrol/tangostationcontrol/devices/recv.py
+19
-6
19 additions, 6 deletions
tangostationcontrol/tangostationcontrol/devices/recv.py
with
25 additions
and
15 deletions
tangostationcontrol/tangostationcontrol/devices/beam.py
+
6
−
9
View file @
03c4d25e
...
@@ -36,11 +36,6 @@ class Beam(lofar_device):
...
@@ -36,11 +36,6 @@ class Beam(lofar_device):
# -----------------
# -----------------
# Device Properties
# Device Properties
# -----------------
# -----------------
HBAT_signal_input_delays
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
default_value
=
numpy
.
zeros
((
96
,
32
),
dtype
=
numpy
.
float64
)
)
# ----------
# ----------
# Attributes
# Attributes
...
@@ -72,8 +67,10 @@ class Beam(lofar_device):
...
@@ -72,8 +67,10 @@ class Beam(lofar_device):
self
.
recv_proxy
=
DeviceProxy
(
"
STAT/RECV/1
"
)
self
.
recv_proxy
=
DeviceProxy
(
"
STAT/RECV/1
"
)
# Retrieve positions from RECV device
# Retrieve positions from RECV device
self
.
hbat_reference_itrf
=
self
.
recv_proxy
.
get_hbat_reference_itrf
().
reshape
(
96
,
3
)
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
)
self
.
HBAT_antenna_itrf
=
self
.
recv_proxy
.
get_hbat_antenna_itrf
().
reshape
(
96
,
16
,
3
)
# Retrieve signal delays from RECV device
self
.
HBAT_signal_input_delays
=
self
.
recv_proxy
.
get_hbat_signal_input_delays
().
reshape
(
96
,
32
)
# --------
# --------
# internal functions
# internal functions
...
@@ -89,11 +86,11 @@ class Beam(lofar_device):
...
@@ -89,11 +86,11 @@ class Beam(lofar_device):
for
tile
in
range
(
96
):
for
tile
in
range
(
96
):
# initialise delay calculator
# initialise delay calculator
d
=
delay_calculator
(
self
.
hbat
_reference_itrf
[
tile
])
d
=
delay_calculator
(
self
.
HBAT
_reference_itrf
[
tile
])
d
.
set_measure_time
(
timestamp
)
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
# 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
.
hbat
_antenna_itrf
[
tile
])
delays
[
tile
]
=
d
.
convert
(
pointing_direction
[
tile
],
self
.
HBAT
_antenna_itrf
[
tile
])
return
delays
return
delays
...
...
This diff is collapsed.
Click to expand it.
tangostationcontrol/tangostationcontrol/devices/recv.py
+
19
−
6
View file @
03c4d25e
...
@@ -74,18 +74,24 @@ class RECV(opcua_device):
...
@@ -74,18 +74,24 @@ class RECV(opcua_device):
# ],dtype=numpy.float64)
# ],dtype=numpy.float64)
# )
# )
hbat
_reference_itrf
=
device_property
(
HBAT
_reference_itrf
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
mandatory
=
False
,
default_value
=
numpy
.
tile
(
numpy
.
array
([
3826577.066
,
461022.948
,
5064892.786
]),(
96
,
1
))
# CS002LBA, in ITRF2005 timestamp 2012.5
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
(
HBAT
_antenna_itrf
=
device_property
(
dtype
=
'
DevVarFloatArray
'
,
dtype
=
'
DevVarFloatArray
'
,
mandatory
=
False
,
mandatory
=
False
,
default_value
=
numpy
.
tile
(
numpy
.
array
([
3826923.546
,
460915.441
,
5064643.489
]),(
96
,
16
,
1
))
# CS001LBA, in ITRF2005 timestamp 2012.5
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
,
default_value
=
numpy
.
zeros
((
96
,
32
),
dtype
=
numpy
.
float64
)
)
first_default_settings
=
[
first_default_settings
=
[
# set the masks first, as those filter any subsequent settings
# set the masks first, as those filter any subsequent settings
'
ANT_mask_RW
'
,
'
ANT_mask_RW
'
,
...
@@ -158,15 +164,22 @@ class RECV(opcua_device):
...
@@ -158,15 +164,22 @@ class RECV(opcua_device):
@DebugIt
()
@DebugIt
()
@only_in_states
([
DevState
.
ON
])
@only_in_states
([
DevState
.
ON
])
def
get_hbat_reference_itrf
(
self
):
def
get_hbat_reference_itrf
(
self
):
"""
Return the property
hbat
_reference_itrf (96x3) into a flatten array
"""
"""
Return the property
HBAT
_reference_itrf (96x3) into a flatten array
"""
return
self
.
hbat
_reference_itrf
.
flatten
()
return
self
.
HBAT
_reference_itrf
.
flatten
()
@command
(
dtype_out
=
DevVarFloatArray
)
@command
(
dtype_out
=
DevVarFloatArray
)
@DebugIt
()
@DebugIt
()
@only_in_states
([
DevState
.
ON
])
@only_in_states
([
DevState
.
ON
])
def
get_hbat_antenna_itrf
(
self
):
def
get_hbat_antenna_itrf
(
self
):
"""
Return the property hbat_antenna_itrf (96x16x3) into a flatten array
"""
"""
Return the property HBAT_antenna_itrf (96x16x3) into a flatten array
"""
return
self
.
hbat_antenna_itrf
.
flatten
()
return
self
.
HBAT_antenna_itrf
.
flatten
()
@command
(
dtype_out
=
DevVarFloatArray
)
@DebugIt
()
@only_in_states
([
DevState
.
ON
])
def
get_hbat_signal_input_delays
(
self
):
"""
Return the property HBAT_signal_input_delays (96x32) into a flatten array
"""
return
self
.
HBAT_signal_input_delays
.
flatten
()
@command
()
@command
()
@DebugIt
()
@DebugIt
()
...
...
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