Skip to content
Snippets Groups Projects
Commit a1b0633d authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'L2SS-478-beam-device' into 'master'

Resolve L2SS-478 "Beam device"

Closes L2SS-478

See merge request !191
parents b69e146d 5f61d9f7
No related branches found
No related tags found
1 merge request!191Resolve L2SS-478 "Beam device"
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
**/.project **/.project
**/.pydevproject **/.pydevproject
**/.settings/org.eclipse.core.resources.prefs **/.settings/org.eclipse.core.resources.prefs
docs/build
tangostationcontrol/dist tangostationcontrol/dist
tangostationcontrol/build tangostationcontrol/build
**/.ipynb_checkpoints **/.ipynb_checkpoints
......
...@@ -21,6 +21,13 @@ ...@@ -21,6 +21,13 @@
} }
} }
}, },
"Beam": {
"STAT": {
"Beam": {
"STAT/Beam/1": {}
}
}
},
"boot": { "boot": {
"STAT": { "STAT": {
"Boot": { "Boot": {
......
#
# Requires:
# - lofar-device-base.yml
#
version: '2'
services:
device-beam:
image: device-beam
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
args:
SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-beam
networks:
- control
ports:
- "5711:5711" # unique port for this DS
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ..:/opt/lofar/tango:rw
environment:
- TANGO_HOST=${TANGO_HOST}
working_dir: /opt/lofar/tango
entrypoint:
- bin/start-ds.sh
# configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA
# can't know about our Docker port forwarding
- l2ss-beam Beam STAT -v -ORBendPoint giop:tcp:0:5711 -ORBendPointPublish giop:tcp:${HOSTNAME}:5711
restart: unless-stopped
...@@ -7,7 +7,8 @@ sst = DeviceProxy("STAT/SST/1") ...@@ -7,7 +7,8 @@ sst = DeviceProxy("STAT/SST/1")
xst = DeviceProxy("STAT/XST/1") xst = DeviceProxy("STAT/XST/1")
unb2 = DeviceProxy("STAT/UNB2/1") unb2 = DeviceProxy("STAT/UNB2/1")
boot = DeviceProxy("STAT/Boot/1") boot = DeviceProxy("STAT/Boot/1")
beam = DeviceProxy("STAT/Beam/1")
docker = DeviceProxy("STAT/Docker/1") docker = DeviceProxy("STAT/Docker/1")
# Put them in a list in case one wants to iterate # Put them in a list in case one wants to iterate
devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, docker] devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, beam, docker]
Beam
====================
The ``beam == DeviceProxy("STAT/Beam/1")`` device sets up the beamforming on the station:
- The HBA tiles in RECV need *analog beamforming* to combine their 16 antennas into a single input for the RCU,
- THe LBAs or HBA tiles need *digital beamforming* in SDP to combine their signals into beamlets.
...@@ -19,6 +19,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st ...@@ -19,6 +19,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st
installation installation
interfaces/overview interfaces/overview
devices/using devices/using
devices/beam
devices/boot devices/boot
devices/docker devices/docker
devices/recv devices/recv
......
...@@ -15,7 +15,7 @@ cd "$LOFAR20_DIR/docker-compose" || exit 1 ...@@ -15,7 +15,7 @@ cd "$LOFAR20_DIR/docker-compose" || exit 1
make build make build
# Start and stop sequence # Start and stop sequence
make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
make start databaseds dsconfig elk make start databaseds dsconfig elk
# Give dsconfig and databaseds time to start # Give dsconfig and databaseds time to start
...@@ -32,7 +32,7 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim ...@@ -32,7 +32,7 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim
# Give the simulators time to start # Give the simulators time to start
sleep 5 sleep 5
make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beam
# Give devices time to restart # Give devices time to restart
# TODO(Corne Lukken): Use a nicer more reliable mechanism # TODO(Corne Lukken): Use a nicer more reliable mechanism
......
...@@ -36,6 +36,7 @@ where=./ ...@@ -36,6 +36,7 @@ where=./
console_scripts = console_scripts =
l2ss-apsct = tangostationcontrol.devices.apsct:main l2ss-apsct = tangostationcontrol.devices.apsct:main
l2ss-apspu = tangostationcontrol.devices.apspu:main l2ss-apspu = tangostationcontrol.devices.apspu:main
l2ss-beam = tangostationcontrol.devices.beam:main
l2ss-boot = tangostationcontrol.devices.boot:main l2ss-boot = tangostationcontrol.devices.boot:main
l2ss-docker-device = tangostationcontrol.devices.docker_device:main l2ss-docker-device = tangostationcontrol.devices.docker_device:main
l2ss-observation = tangostationcontrol.devices.observation:main l2ss-observation = tangostationcontrol.devices.observation:main
......
...@@ -10,6 +10,9 @@ If a new device is added, it will (likely) need to be referenced in several plac ...@@ -10,6 +10,9 @@ If a new device is added, it will (likely) need to be referenced in several plac
- Adjust `docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py` to make an alias for it available in Jupyter, - Adjust `docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py` to make an alias for it available in Jupyter,
- Adjust `tangostationcontrol/tangostationcontrol/devices/boot.py` to add the device to the station initialisation sequence, - Adjust `tangostationcontrol/tangostationcontrol/devices/boot.py` to add the device to the station initialisation sequence,
- Add to `docker-compose/` to create a YaML file to start the device in a docker container. NOTE: it needs a unique 57xx port assigned, - Add to `docker-compose/` to create a YaML file to start the device in a docker container. NOTE: it needs a unique 57xx port assigned,
- Adjust `tangostationcontrol/setup.cfg` to add an entry point for the device in the package installation,
- Add to `tangostationcontrol/tangostationcontrol/integration_test/devices/` to add an integration test, - Add to `tangostationcontrol/tangostationcontrol/integration_test/devices/` to add an integration test,
- Adjust `sbin/run_integration_test.sh` to have the device started when running the integration tests, - Adjust `sbin/run_integration_test.sh` to have the device started when running the integration tests,
- Add to `docs/source/devices/` to mention the device in the end-user documentation. - Add to `docs/source/devices/` to mention the device in the end-user documentation.
- Adjust `docs/source/index.rst` to include the newly created file in `docs/source/devices/`.
# -*- coding: utf-8 -*-
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
""" Beam Device Server for LOFAR2.0
"""
# PyTango imports
from tango import AttrWriteType
import numpy
# Additional import
from tangostationcontrol.devices.device_decorators import *
from tangostationcontrol.common.entrypoint import entry
from tangostationcontrol.clients.attribute_wrapper import attribute_wrapper
from tangostationcontrol.devices.lofar_device import lofar_device
from tangostationcontrol.common.lofar_logging import device_logging_to_python, log_exceptions
__all__ = ["Beam", "main"]
@device_logging_to_python()
class Beam(lofar_device):
# -----------------
# Device Properties
# -----------------
# ----------
# Attributes
# ----------
pass
# --------
# overloaded functions
# --------
# --------
# Commands
# --------
# ----------
# Run server
# ----------
def main(**kwargs):
"""Main function of the ObservationControl module."""
return entry(Beam, **kwargs)
...@@ -251,6 +251,7 @@ class Boot(lofar_device): ...@@ -251,6 +251,7 @@ class Boot(lofar_device):
"STAT/SDP/1", # SDP controls the mask for SST/XST/BST, so initialise it first "STAT/SDP/1", # SDP controls the mask for SST/XST/BST, so initialise it first
"STAT/SST/1", "STAT/SST/1",
"STAT/XST/1", "STAT/XST/1",
"STAT/Beam/1", # Accesses RECV and SDP
], ],
) )
......
# -*- coding: utf-8 -*-
#
# This file is part of the LOFAR 2.0 Station Software
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
from .base import AbstractTestBases
class TestDeviceBeam(AbstractTestBases.TestDeviceBase):
def setUp(self):
super().setUp("STAT/Beam/1")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment