Signal Monitoring API

 


This is a package with an API for signal access and processing for the LHC Signal Monitoring project.

Signal Monitoring Project Architecture

The Signal Monitoring project architecture consists of four elements:

  1. API for logging db query and signal processing (https://gitlab.cern.ch/lhcdata/lhc-sm-api)
  2. Signal Monitoring notebooks (https://gitlab.cern.ch/lhcdata/lhc-sm-apps)
  3. HWC and Operation notebooks (https://gitlab.cern.ch/lhcdata/lhc-sm-hwc)
  4. Scheduler for execution of HWC notebooks and monitoring applications (https://gitlab.cern.ch/lhcdata/lhc-sm-scheduler)

Signal Monitoring API Architecture

The API is a collection of six modules for:

  • database access (DBSignal);
  • signal, system, circuit naming (Metadata);
  • signal and event references (Reference);
  • embedded domain specific language for signal/feature/event query and processing, signal assertion, and feature engineering;
  • signal query, analysis, and plot (Analysis);
  • graphical user interfaces for browsing of historicalsignal features (GUI).

Detailed API documentation with examples of use is available at http://cern.ch/lhc-sm-api

Installation

In order to use the API, it has to be installed with a python package installer as

pip install --user lhcsmapi

Check the latest version at https://pypi.org/project/lhcsmapi/

The API relies on several external python packages which have to be installed in a similar manner. The list of packages is stored in the requirements.txt file.

If you use SWAN, the service provides a set of pre-installed python packages through CVMFS. The LHC-SM notebooks require installation of several additional packages on top of CVMFS. In order to install a package, please open a SWAN Terminal by clicking [>_] icon in the top right corner.

SWAN CLI Button

Five additional python packages have to be installed:

  • tzlocal - for time zone convertion
  • tqdm - for progress bar to track queries
  • influxdb - for communication with an Influxdb
  • plotly - for interactive plotting of circuit schematics
  • lhcsmapi - for LHC-SM API In order to install a package please execute the following command
    $ pip install --user package_name

The expected output, after installing all packages, is presented in five figures below.

  • SWAN Terminal output after successful installation of tzlocal package. SWAN pip install tzlocal

  • SWAN Terminal output after successful installation of tqdm package. SWAN pip install tqdm

  • SWAN Terminal output after successful installation of influxdb package. SWAN pip install influxdb

  • SWAN Terminal output after successful installation of plotly package. SWAN pip install plotly

  • SWAN Terminal output after successful installation of lhcsmapi package. SWAN pip install lhcsmapi

Updating lhcsmapi Package

Please note that the first four packages (tzlocal, tqdm, influxdb, plotly) have to be installed only once while the last one is still in the development phase and subject to frequent updates. Please send us an e-mail request (mailto:lhc-signal-monitoring@cern.ch) if you want to subscribe for updates. In order to update the lhcsmapi package, please execute the following command.

$ pip install --user --upgrade lhcsmapi

In case this command returns an error, please try to execute it again. Should that operation also fail, please uninstall the package by executing

$ pip uninstall lhcsmapi

and performing a fresh installation the package

$ pip install --user lhcsmapi

Should you experience any further issues with installing a package, please contact SWAN support.