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

L2SS-434: Improved XST and device descriptions

parent bed482a5
Branches
Tags
1 merge request!150L2SS-434: Add sphinx documentation content
...@@ -59,14 +59,6 @@ Complex values which cannot be represented in Tango attributes. Instead, the XST ...@@ -59,14 +59,6 @@ Complex values which cannot be represented in Tango attributes. Instead, the XST
:type: ``float32[N_ant][N_ant]`` :type: ``float32[N_ant][N_ant]``
:xst_blocks_R: Blocks of crosslet statistics, as received from the FPGA (see below).
:type: ``int64[N_blocks][block_size]``
:xst_conjugated_R: Whether the block contains conjugated data. If so, it must be conjugated again on interpretation.
:type: ``bool[N_blocks]``
:xst_timestamp_R: Timestamp of each block. :xst_timestamp_R: Timestamp of each block.
:type: ``int64[N_blocks]`` :type: ``int64[N_blocks]``
...@@ -75,9 +67,9 @@ Complex values which cannot be represented in Tango attributes. Instead, the XST ...@@ -75,9 +67,9 @@ Complex values which cannot be represented in Tango attributes. Instead, the XST
:type: ``float32[N_blocks]`` :type: ``float32[N_blocks]``
Typically, ``N_ant == 192``. Typically, ``N_ant == 192``, and ``N_blocks == 136``.
The metadata refers to the *blocks*, which are emitted by the FPGAs to represent the XSTs between 12 x 12 antennas. The following code converts block numbers to the indices of the first antenna pair in a block:: The metadata refers to the *blocks*, which are emitted by the FPGAs to represent the XSTs between 12 x 12 consecutive antennas. The following code converts block numbers to the indices of the first antenna pair in a block::
from common.baselines import baseline_from_index from common.baselines import baseline_from_index
...@@ -90,9 +82,7 @@ Conversely, to calculate the block index for an antenna pair ``(a,b)``, use:: ...@@ -90,9 +82,7 @@ Conversely, to calculate the block index for an antenna pair ``(a,b)``, use::
from common.baselines import baseline_index from common.baselines import baseline_index
def block_nr(a: int, b: int) -> int: def block_nr(a: int, b: int) -> int:
return baseline_index(a / 12, b / 12) return baseline_index(a // 12, b // 12)
The ``block_size`` is equal to the number of antennas, times two for the real and imaginary parts (stored consecutively), so ``12*12*2``.
TCP stream TCP stream
`````````` ``````````
...@@ -118,8 +108,8 @@ The writer can also parse a statistics stream stored in a file, so the stream ca ...@@ -118,8 +108,8 @@ The writer can also parse a statistics stream stored in a file, so the stream ca
nc localhost 5101 > SST-packets.bin nc localhost 5101 > SST-packets.bin
Performance monitoring Performance monitoring and debugging
````````````````````````` `````````````````````````````````````
All statistics expose attributes that provide general statistics about the data received. The counters are set to 0 when the device is initialised: All statistics expose attributes that provide general statistics about the data received. The counters are set to 0 when the device is initialised:
...@@ -158,3 +148,12 @@ Note that nominally:: ...@@ -158,3 +148,12 @@ Note that nominally::
+ sum(nof_payload_errors_R) + sum(nof_payload_errors_R)
+ sum(nof_valid_payloads_R) + sum(nof_valid_payloads_R)
The XSTs also expose the raw blocks as they were received from the FPGAs:
:xst_blocks_R: Blocks of crosslet statistics, as received from the FPGA (see below). Each block is easier to interpret after a ``.reshape((12,12,2))``, representing the first & second antenna within the block, and the real/imaginary components.
:type: ``int64[N_blocks][block_size]``
:xst_conjugated_R: Whether the corresponding block contains conjugated data. If so, it must be conjugated again on interpretation.
:type: ``bool[N_blocks]``
...@@ -11,7 +11,9 @@ The station exposes *devices*, each of which is a remote software object that ma ...@@ -11,7 +11,9 @@ The station exposes *devices*, each of which is a remote software object that ma
To access a device, one creates a ``Device`` object. For example:: To access a device, one creates a ``Device`` object. For example::
device = Device("LTS/RECV/1") recv = Device("LTS/RECV/1")
See :doc:`control` on how and where to execute this code.
States States
------------ ------------
...@@ -44,4 +46,7 @@ The device can be operated in ``ON`` state, where it exposes *attributes* and *c ...@@ -44,4 +46,7 @@ The device can be operated in ``ON`` state, where it exposes *attributes* and *c
# retrieve the status of all LED0s # retrieve the status of all LED0s
print(recv.RCU_LED0_R) print(recv.RCU_LED0_R)
The attributes with an ``_R`` suffix are monitoring points, reflecting the state of the hardware, and are thus read-only. The attributes with an ``_RW`` suffix are control points, reflecting the desired state of the hardware. They are read-write, where writing requests the hardware to set the specified value, and reading returns the last requested value. The attributes with an:
- ``_R`` suffix are monitoring points, reflecting the state of the hardware, and are thus read-only.
- ``_RW`` suffix are control points, reflecting the desired state of the hardware. They are read-write, where writing requests the hardware to set the specified value. Reading them returns the last requested value.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment