Station Client Library
Client library for using Tango Station Control.
Table of Contents:
Prerequisites
This package uses PyTango, which wraps the Tango C++ library. You will need to install the Tango C++ headers & library to allow pip
to install PyTango as part of this package's requirements:
Debian and Ubuntu provide these natively:
apt-get install libtango-dev
Under Arch, install the tango-cpp AUR package. For other distros and installation methods, see Tango's Linux installation manual.
You will also need the Boost Python C++ headers & libraries to compile PyTango. Under Debian/Ubuntu, obtain these through:
apt-get install libboost-python-dev
Installation
Wheel distributions are available from the gitlab package registry, install using after downloading:
pip install *.whl
Alternatively install latest version on master using:
pip3 install lofar-station-client@git+https://git.astron.nl/lofar2.0/lofar-station-client
Or install directly from the source at any branch or commit:
pip install ./
Usage
For more thorough usage explanation please consult the documentation
from lofar_station_client import get_attribute_history
# Metrics from the last hour
get_attribute_history("Pointing_direction_R", "stat/digitalbeam/1")
# Specify range in epoch
get_attribute_history("Pointing_direction_R", "stat/digitalbeam/1", start=1655725200.0, end=1655815200.0)
Development
Be sure to validate your patches will pass the build system by executing tox
everytime before you submit.
pip install tox
tox
To ensure your patch will pass documentation and or packaging tests run
tox -e docs
tox -e build
Running integration tests is also possible.
tox -e build
tox -e integration
Debug
Place import pdb; pdb.set_trace()
on desired breakpoints and execute:
tox -e debug path.to.test
tox -e debug tests.requests.test_prometheus
Releasenotes
- 0.14.7 - Refactor LazyDeviceProxy
- 0.14.6 - Removed deprecated StationSSTCollector
- 0.14.5 - Added
gn_indices
and support for global node indices > 16. - 0.14.4 - Fixed bug on
writer_version
retrieval - 0.14.3 - Added
rcu_pcb_id
andrcu_pcb_version
to Hdf5 file header - 0.14.2 - Added
station_name
attribute to Hdf5 file header - 0.14.1 - Added
beamlet.subband_select_RW
attribute to BSTHdf5Writer - 0.14 - Added new attributes to statistics HDF file as well as documentation
- 0.13 - Added lazy connection behavior to
devices.LofarDeviceProxy
class - 0.12.
- Added
HDF5Writer
class for writing HDF5 statistics file - Added
Receiver
class for creating a file/TCP receiver for retrieving statistics data - Added
Reader
class for parsing and reading statistics file data - Added
StationSSTCollector
for handling Tango device parameters - Added
Entry
file which includes the procedures to launch the statistics writer
- Added
- 0.11.2 - MultiStationObservation start() and stop() return the station results
- 0.11.1 - Bug fixes in observation code
- 0.11.
- Added
MultiStationObservation
class for a pythonic interface with observations across multiple stations. - Added
StationObservation
class for pythonic interface with observations - Added
Observation
class for pythonic interface with observations - Added generic HDF5 file reader
- Added
- 0.9.1 - Add
last_invalid_packet_exception
parameter toStatisticsCollector
- 0.9. - Added
devices.LofarDeviceProxy
that transparently exposes >2D attributes - 0.8. - Fixed XST packet parsing.
- 0.7. - Partial rework of DTS outside code, still many possible improvements.
- 0.6. - Correctly transpose XST blocks in
XSTCollector
. - 0.5. - Swapped [x][y] for [y][x] dimensionality in
get_attribute_history
- 0.4. - Added collectors including
XSTCollector
,BSTCollector
andSSTCollecotr
import underfrom lofar_station_client.statistics import xxx
- 0.x. - Lost to the Void