Skip to content
Snippets Groups Projects
Commit 55adcbea authored by Taya Snijder's avatar Taya Snijder
Browse files

Merge branch 'master' of https://git.astron.nl/lofar2.0/tango into L2SS-952-fix-for-N_beamsets_ctrl

parents 55f20baa 730e2ad8
No related branches found
No related tags found
1 merge request!420L2SS-952: fixed N_beamsets_ctrl
Showing
with 195 additions and 45 deletions
......@@ -86,11 +86,13 @@ docker_build_image_all:
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh grafana latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh jupyter latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh apsct-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh ccd-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh apspu-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh recv-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh sdptr-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh unb2-sim latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apsct latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-ccd latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apspu latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-tilebeam latest
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-beamlet latest
......@@ -191,6 +193,17 @@ docker_build_image_apsct_sim:
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh apsct-sim $tag
docker_build_image_ccd_sim:
extends: .base_docker_images_except
only:
refs:
- merge_requests
changes:
- docker-compose/ccd-sim.yml
- docker-compose/pypcc-sim-base/*
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh ccd-sim $tag
docker_build_image_apspu_sim:
extends: .base_docker_images_except
only:
......@@ -246,6 +259,17 @@ docker_build_image_device_apsct:
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-aspct $tag
docker_build_image_device_ccd:
extends: .base_docker_images_except
only:
refs:
- merge_requests
changes:
- docker-compose/device-ccd.yml
- docker-compose/lofar-device-base/*
script:
# Do not remove 'bash' or statement will be ignored by primitive docker shell
- bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-ccd $tag
docker_build_image_device_apspu:
extends: .base_docker_images_except
only:
......
......@@ -169,6 +169,16 @@
}
}
},
"CCD": {
"STAT": {
"CCD": {
"STAT/CCD/1": {
"properties": {
}
}
}
}
},
"APSPU": {
"STAT": {
"APSPU": {
......
......@@ -19,7 +19,7 @@
"461022.948",
"5064892.786"
],
"HBAT_reference_itrf": [
"Antenna_Reference_itrf": [
"3826577.066",
"461022.948",
"5064892.786",
......@@ -368,7 +368,7 @@
"461022.948",
"5064892.786"
],
"HBAT_reference_itrf": [
"Antenna_Reference_itrf": [
"3826577.066",
"461022.948",
"5064892.786",
......@@ -717,7 +717,7 @@
"461022.948",
"5064892.786"
],
"HBAT_reference_itrf": [
"Antenna_Reference_itrf": [
"3826577.066",
"461022.948",
"5064892.786",
......@@ -1066,7 +1066,7 @@
"461022.948",
"5064892.786"
],
"HBAT_reference_itrf": [
"Antenna_Reference_itrf": [
"3826577.066",
"461022.948",
"5064892.786",
......
......@@ -150,14 +150,14 @@
"RECV_devices": [
"STAT/RECV/1"
],
"HBAT_Control_to_RECV_mapping": [
"Control_to_RECV_mapping": [
"1", "24",
"0", "-1",
"0", "-1",
"1", "25",
"1", "26"
],
"HBAT_Power_to_RECV_mapping": [
"Power_to_RECV_mapping": [
"1", "27",
"0", "-1",
"0", "-1",
......@@ -167,7 +167,7 @@
"Antenna_Field_Reference_ETRS": [
"3839371.416", "430339.901", "5057958.886"
],
"HBAT_reference_ETRS": [
"Antenna_Reference_ETRS": [
"3839371.416", "430339.901", "5057958.886",
"3839368.919", "430335.979", "5057961.1",
"3839365.645", "430339.299", "5057963.288",
......
......@@ -24,6 +24,7 @@
"STAT/PCON/1",
"STAT/APSPU/1",
"STAT/APSCT/1",
"STAT/CCD/1",
"STAT/RECV/1",
"STAT/UNB2/1",
"STAT/SDP/1",
......@@ -60,6 +61,25 @@
}
}
},
"CCD": {
"STAT": {
"CCD": {
"STAT/CCD/1": {
"properties": {
"OPC_Server_Name": [
"10.87.6.67 "
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"APSPU": {
"STAT": {
"APSPU": {
......@@ -162,14 +182,14 @@
"C3",
"C4"
],
"HBAT_Control_to_RECV_mapping": [
"Control_to_RECV_mapping": [
"1","27",
"0","-1",
"0","-1",
"1","28",
"1","29"
],
"HBAT_Power_to_RECV_mapping": [
"Power_to_RECV_mapping": [
"1","24",
"0","-1",
"0","-1",
......@@ -179,7 +199,7 @@
"Antenna_Field_Reference_ETRS": [
"3839371.416","430339.901","5057958.886"
],
"HBAT_reference_ETRS": [
"Antenna_Reference_ETRS": [
"3839371.416","430339.901","5057958.886",
"3839368.919","430335.979","5057961.1",
"3839365.645","430339.299","5057963.288",
......@@ -216,7 +236,7 @@
"LBA8",
"LBA9"
],
"HBAT_Control_to_RECV_mapping": [
"Control_to_RECV_mapping": [
"1","1",
"1","3",
"1","5",
......@@ -227,7 +247,7 @@
"1","15",
"1","17"
],
"HBAT_Power_to_RECV_mapping": [
"Power_to_RECV_mapping": [
"1","1",
"1","3",
"1","5",
......@@ -243,7 +263,7 @@
"430354.482",
"5057967.804"
],
"HBAT_reference_ETRS": [
"Antenna_Reference_ETRS": [
"3839358.189","430354.482","5057967.804",
"3839359.127","430348.074","5057967.607",
"3839360.084","430341.872","5057967.379",
......
......@@ -5,7 +5,7 @@
"AntennaField": {
"STAT/AntennaField/1": {
"properties": {
"HBAT_Control_to_RECV_mapping": [
"Control_to_RECV_mapping": [
"1", "0",
"1", "1",
"1", "2",
......@@ -55,7 +55,7 @@
"1", "46",
"1", "47"
],
"HBAT_Power_to_RECV_mapping": [
"Power_to_RECV_mapping": [
"1", "48",
"1", "49",
"1", "50",
......@@ -108,7 +108,7 @@
"Antenna_Field_Reference_ETRS": [
"3826896.631", "460979.131", "5064657.943"
],
"HBAT_reference_ETRS": [
"Antenna_Reference_ETRS": [
"3826886.142", "460980.772", "5064665.668",
"3826887.237", "460985.643", "5064664.406",
"3826889.022", "460974.271", "5064664.094",
......@@ -212,16 +212,6 @@
"-0.1195951054", "-0.7919544517", "0.5987530018",
" 0.9928227484", "-0.0954186800", "0.0720990002",
" 0.0000330969", " 0.6030782884", "0.7976820024"
],
"HBAT_Control_to_RECV_mapping": [
"1", "0", "1", "1", "1", "2", "1", "3", "1", "4", "1", "5",
"1", "6", "1", "7", "1", "8", "1", "9", "1", "10", "1", "11",
"1", "12", "1", "13", "1", "14", "1", "15", "1", "16", "1", "17",
"1", "18", "1", "19", "1", "20", "1", "21", "1", "22", "1", "23",
"1", "24", "1", "25", "1", "26", "1", "27", "1", "28", "1", "29",
"1", "30", "1", "31", "1", "32", "1", "33", "1", "34", "1", "35",
"1", "36", "1", "37", "1", "38", "1", "39", "1", "40", "1", "41",
"1", "42", "1", "43", "1", "44", "1", "45", "1", "46", "1", "47"
]
}
}
......
......@@ -32,6 +32,25 @@
}
}
},
"CCD": {
"STAT": {
"CCD": {
"STAT/CCD/1": {
"properties": {
"OPC_Server_Name": [
"ccd-sim"
],
"OPC_Server_Port": [
"4843"
],
"OPC_Time_Out": [
"5.0"
]
}
}
}
}
},
"APSPU": {
"STAT": {
"APSPU": {
......@@ -125,7 +144,7 @@
"RECV, HBAT_LED_on_RW"
],
"Shutdown_Device_List":[
"STAT/SDP/1", "STAT/UNB2/1", "STAT/RECV/1", "STAT/APSCT/1", "STAT/APSPU/1"
"STAT/SDP/1", "STAT/UNB2/1", "STAT/RECV/1", "STAT/APSCT/1", "STAT/CCD/1","STAT/APSPU/1"
]
}
}
......
......@@ -37,6 +37,8 @@ else
rm -rf /tmp/tangostationcontrol
cp -R /opt/lofar/tango/tangostationcontrol /tmp/
cd /tmp/tangostationcontrol || exit 1
# Remove the build directory if copied from the source
rm -rf build
pip -vvv install --upgrade --force-reinstall ./
fi
......
#
# Docker compose file that launches an APSCT simulator
#
# Defines:
# - apsct-sim
#
version: '2.1'
services:
ccd-sim:
build:
context: pypcc-sim-base
args:
- LOCAL_DOCKER_REGISTRY_HOST=${LOCAL_DOCKER_REGISTRY_HOST}
- LOCAL_DOCKER_REGISTRY_LOFAR=${LOCAL_DOCKER_REGISTRY_LOFAR}
container_name: ${CONTAINER_NAME_PREFIX}ccd-sim
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
networks:
- control
entrypoint: hwtr --simulator --port 4843 --config CCDTR
restart: on-failure
#
# Docker compose file that launches an interactive iTango session.
#
# Connect to the interactive session with 'docker attach itango'.
# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q>
#
# Defines:
# - itango: iTango interactive session
#
# Requires:
# - lofar-device-base.yml
#
version: '2.1'
services:
device-ccd:
image: device-ccd
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: .
dockerfile: lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-ccd
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
networks:
- control
ports:
- "5721:5721" # 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-ccd Ccd STAT -v -ORBendPoint giop:tcp:device-ccd:5721 -ORBendPointPublish giop:tcp:${HOSTNAME}:5721
restart: on-failure
# Create shortcuts for our devices
apsct = DeviceProxy("STAT/APSCT/1")
ccd = DeviceProxy("STAT/CCD/1")
apspu = DeviceProxy("STAT/APSPU/1")
recv = DeviceProxy("STAT/RECV/1")
sdp = DeviceProxy("STAT/SDP/1")
......@@ -17,4 +18,4 @@ docker = DeviceProxy("STAT/Docker/1")
temperaturemanager = DeviceProxy("STAT/TemperatureManager/1")
# Put them in a list in case one wants to iterate
devices = [apsct, apspu, recv, sdp, bst, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, antennafield, temperaturemanager, docker]
devices = [apsct, ccd, apspu, recv, sdp, bst, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, antennafield, temperaturemanager, docker]
......@@ -7,7 +7,7 @@
"devices": {
"stat/antennafield/1": {
"include": [
"HBAT_ANT_mask_RW"
"ANT_mask_RW"
],
"exclude": [
"HBAT_BF_delay_steps_*"
......@@ -15,6 +15,8 @@
},
"stat/apsct/1": {
},
"stat/ccd/1": {
},
"stat/apspu/1": {
},
"stat/beamlet/1": {
......
......@@ -73,9 +73,9 @@ sleep 1 # dsconfig container must be up and running...
# shellcheck disable=SC2016
echo '/usr/local/bin/wait-for-it.sh ${TANGO_HOST} --strict --timeout=300 -- true' | make run dsconfig bash -
DEVICES="device-boot device-apsct device-apspu device-sdp device-recv device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-psoc device-pcon device-antennafield device-temperature-manager device-observation device-observation-control"
DEVICES="device-boot device-apsct device-ccd device-apspu device-sdp device-recv device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-psoc device-pcon device-antennafield device-temperature-manager device-observation device-observation-control"
SIMULATORS="sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim"
SIMULATORS="sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim ccd-sim"
# Build only the required images, please do not build everything that makes CI
# take really long to finish, especially grafana / jupyter / prometheus.
......
......@@ -64,11 +64,13 @@ LOCAL_IMAGES=(
"lofar-device-base lofar-device-base y"
"apsct-sim docker-compose_apsct-sim y" "apspu-sim docker-compose_apspu-sim y"
"ccd-sim docker-compose_ccd-sim y"
"recv-sim docker-compose_recv-sim y" "sdptr-sim docker-compose_sdptr-sim y"
"unb2-sim docker-compose_unb2-sim y"
"device-antennafield device-antennafield y"
"device-apsct device-apsct y" "device-apspu device-apspu y"
"device-ccd device-ccd y"
"device-boot device-boot y" "device-docker device-docker y"
"device-observation device-observation y"
"device-observation-control device-observation-control y"
......@@ -159,13 +161,13 @@ if [ ! -z "${1+x}" ] && [ "${1}" != "pull" ]; then
local_url="${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/${2}"
# If tag is not latest, than it is not a tagged master build and we can
# pull the latest image as cache.
# pull the latest image as cache (if it already exists).
if [ "${tag}" != "latest" ]; then
docker pull "${local_url}:latest"
docker pull "${local_url}:latest" || true
fi
make build "${1}"
docker tag "${2}" "${local_url}:${tag}"
docker tag "${2}" "${local_url}:${tag}" || docker tag "${2/_/-}" "${local_url}:${tag}"
docker push "${local_url}:${tag}"
fi
done
......
......@@ -3,13 +3,13 @@ AntennaField
The ``antennafield == DeviceProxy("STAT/AntennaField/1")`` device represents a set of *antennas* or *tiles* that collectively form an antenna field. It represents a selection of inputs from one or more ``RECV`` devices, annotated with metadata such as positional information.
:nr_tiles_R: The number of antennas or tiles in the antenna field.
:nr_antennas_R: The number of antennas or tiles in the antenna field.
:type: ``uint32``
It provides many settings that map onto the ``RECV`` device directly, serving as a funnel:
:HBAT_ANT_mask_RW: Which antennas are configured when writing settings.
:ANT_mask_RW: Which antennas are configured when writing settings.
:type: ``bool[N_tiles]``
......@@ -20,7 +20,7 @@ Positions
The following attributes expose positional information about the individual antennas in the field, in different formats:
:HBAT_reference_GEO_R: Reference position of each HBA tile, in latitude/longitude (degrees).
:Antenna_Reference_GEO_R: Reference position of each HBA tile, in latitude/longitude (degrees).
:type: ``float64[N_tiles][2]``
......@@ -46,19 +46,19 @@ The antennas represented by the antenna field are selected by the following prop
:type: ``str[]``
:HBAT_Power_to_RECV_mapping: Pairs of numbers ``(recv_idx, ant_idx)`` describing the inputs on which the HBAT *power* is connected. The ``recv_idx`` is the index in ``RECV_devices``, starting at 1. The ``ant_idx`` is the absolute index of the antenna in the ``RECV`` device. A value of ``-1`` means the antenna is not connected at all.
:Power_to_RECV_mapping: Pairs of numbers ``(recv_idx, ant_idx)`` describing the inputs on which the Antenna *power* is connected. The ``recv_idx`` is the index in ``RECV_devices``, starting at 1. The ``ant_idx`` is the absolute index of the antenna in the ``RECV`` device. A value of ``-1`` means the antenna is not connected at all.
:type: ``int32[]``
:shape: ``int32[][2]``
:HBAT_Control_to_RECV_mapping: Pairs of numbers ``(recv_idx, ant_idx)`` describing the inputs on which the HBAT *control* is connected. The ``recv_idx`` is the index in ``RECV_devices``, starting at 1. The ``ant_idx`` is the absolute index of the antenna in the ``RECV`` device. A value of ``-1`` means the antenna is not connected at all.
:Control_to_RECV_mapping: Pairs of numbers ``(recv_idx, ant_idx)`` describing the inputs on which the Antenna *control* is connected. The ``recv_idx`` is the index in ``RECV_devices``, starting at 1. The ``ant_idx`` is the absolute index of the antenna in the ``RECV`` device. A value of ``-1`` means the antenna is not connected at all.
Positions
""""""""""""""""""""
The positions are given in ETRS, using the following properties:
:HBAT_reference_ETRS: Reference position of each HBA tile, in ETRS (x/y/z, metres).
:Antenna_Reference_ETRS: Reference position of each HBA tile, in ETRS (x/y/z, metres).
:type: ``float64[N_tiles][3]``
......
.. _ccd:
CCD
--------------------
The ``ccd == DeviceProxy("STAT/CCD/1")`` Clock Control Device controls the clock
......@@ -22,9 +22,9 @@ Both devices beamform the antennas configured in its associated ``AntennaField``
- TileBeam:
- Beamforms HBA elements in the HBA tiles of its AntennaField device,
- Uses ``antennafield.HBAT_Reference_ITRF_R`` as the reference position for each tile,
- Uses ``antennafield.Antenna_Reference_ITRF_R`` as the reference position for each tile,
- Allows a different pointing per HBA tile,
- ``N_output := antennafield.nr_tiles_R``,
- ``N_output := antennafield.nr_antennas_R``,
- Uploads the computed weights to ``antennafield.HBAT_bf_delay_steps_RW``,
- These weights are actually *delay steps* to be applied in the tile for each element.
......@@ -141,7 +141,7 @@ The following timers allow you to track the durations of each stage:
DigitalBeam
`````````````````````
The DigitalBeam device applies the following configuration to compute each beamlet. Here, ``N_ant := antennafield.nr_tiles_R`` and ``N_beamlet := NUM_BEAMLETS == N_output``.
The DigitalBeam device applies the following configuration to compute each beamlet. Here, ``N_ant := antennafield.nr_antennas_R`` and ``N_beamlet := NUM_BEAMLETS == N_output``.
:antenna_select_RW: Which beamlets to form with which antenna. ``True`` by default, except for antennas which are not mapped on any FPGA input (see "Configuration" below).
......
......@@ -29,6 +29,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st
devices/boot
devices/docker
devices/psoc
devices/ccd
devices/temperature-manager
devices/configure
configure_station
......
......@@ -35,6 +35,7 @@ where=.
[options.entry_points]
console_scripts =
l2ss-apsct = tangostationcontrol.devices.apsct:main
l2ss-ccd = tangostationcontrol.devices.ccd:main
l2ss-apspu = tangostationcontrol.devices.apspu:main
l2ss-psoc = tangostationcontrol.devices.psoc:main
l2ss-pcon = tangostationcontrol.devices.pcon:main
......
......@@ -18,4 +18,4 @@ If a new device is added, it will (likely) need to be referenced in several plac
- Add to `sbin/tag_and_push_docker_image.sh` the LOCAL_IMAGES device name, imagine name and build for integration boolean triple,
- Add to `tangostationcontrol/docs/source/devices/` to mention the device in the end-user documentation.
- Adjust `tangostationcontrol/docs/source/index.rst` to include the newly created file in `docs/source/devices/`.
- Adjust `docker-compose/tango-prometheus-exporter/lofar2-policy.json` to include this device in the prometheus exporter
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment