Skip to content
Snippets Groups Projects
Select Git revision
  • 0.14.7
  • main default protected
  • test-10rc4
  • test-pytango-10rc2
  • bassa-main-patch-68330
  • fix-hfd5-close-error
  • offer-ports-constant
  • fix-timestamps-refactor-matrix-construction
  • bugfixes
  • fix-bst-dimensions
  • fix-bsts
  • L2SS-1465-add-bst-metadata
  • L2SS-1464-add-antennafield-to-filename
  • L2SS-1451-simplify-cmdline
  • L2SS-1425-dont-rewrite-whole-dict
  • testing-specify-file
  • also-record-tilebeam-tracking-enabled
  • dont-modulo-16
  • remove-parse-device-attributes
  • support-higher-gn-indices
  • L2SS-1080_get_statistics_writer_package_version
  • v0.23
  • v0.22.3 protected
  • v0.22.dev4 protected
  • v0.22.dev3 protected
  • v0.22.2 protected
  • v0.22.1 protected
  • v0.22.dev2 protected
  • v0.22
  • v0.22.dev1 protected
  • v0.22.dev0 protected
  • v0.21
  • v0.21.dev6 protected
  • v0.21.dev5 protected
  • v0.21.dev4 protected
  • v0.21.dev3 protected
  • v0.21.dev2 protected
  • v0.21.dev1 protected
  • v0.21.dev0 protected
  • v0.20
  • v0.20.dev1 protected
41 results

lofar-station-client

  • Open with
  • Download source code
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • Hannes Feldt's avatar
    L2SS-1388: Lofar station client intermittent unit test test_lazy_write_scalar
    Hannes Feldt authored
    84f760bb
    History

    Pipeline Status Coverage Status Python Versions Latest Documentation License Latest Release

    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 and rcu_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
    • 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
    • 0.9.1 - Add last_invalid_packet_exception parameter to StatisticsCollector
    • 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 and SSTCollecotr import under from lofar_station_client.statistics import xxx
    • 0.x. - Lost to the Void