Skip to main content

Python based data viewer for next generation of APS control system (C2)

Project description

C2DataViewer: EPICS7 pvObject Data Viewer

C2DataViewer is a Python based data viewer for next generation of APS control system (C2). It is developed with pyqtgraph, PyQt, and uses pvaPy as pvAccess Python binding. This is a viewer for pvData structured data objects as transported by pvAccess. Some use cases are a 'scope viewer', and Area Detector images from the AD pva plugin.

Image Application

Image application displays images from an areaDetector pvAccess channel. To start:

c2dv --app image --pv <CHANNELNAME>

Image zoom

Users can zoom into the image by selecting the region of interest. This can be done by drawing the rectangle around the desired area while the mouse button is pressed. To restore the full image Reset zoom should be pressed.

Scope Application

Scope application displays arbitrary information from a pvAccess channel as a time series graph. To start:

c2dv --app scope

Triggering

Scope application supports software triggering via external v3 PV. When trigger mode is configured and trigger occur, selected displayed channels will be updated for the trigger time. Number of samples displayed can be controlled via Buffer (Samples) parameter. Trigger timestamp is always at the middle of the displayed waveform and is marked with the red line.

Types of the records which can be used as the triggers are:

  • bi / bo - The trigger event is triggered on transition from 0 -> 1.
  • longin / longout - The trigger event is triggered on any value change.
  • calc - The trigger event is triggered on any value change.
  • event - The trigger event is triggered on any value change.
  • ai / ao - The trigger event is triggered when the following condition is true: PV value >= Trigger Threshold.

Follow next steps to configure the trigger:

  1. Acquisition must be stopped.
  2. Enter Trigger PV (must be available on the network).
  3. Enable Trigger Mode.
  4. Select Trigger Threshold if the input record is of type ai or ao. For other types this value is ignored.
  5. Select desired input channels.
  6. Start the acquisition.
  7. When the trigger condition is meet, the waveform will draw/update.

Developers Guide

The following information are maintaining and developing C2 Data viewer

Building locally

NOTE : c2dv currently require pyqtgraph version 0.10.0. There is an unresolved issue with the newer version(s): https://git.aps.anl.gov/C2/conda/data-viewer/-/issues/48. Correct version of the pyqtgraph should be installed manually.

To build a conda package:

make

To install build package in a new environment:

conda create -n c2dv.0001 pyqtgraph=0.10.0 local::c2dataviewer -c epics

To run app from new environment:

source activate c2dv.0001
c2dv --app scope

Pip Packaging

To install pip dependencies:

make pip-dependecies

To build a pip package:

make pip-build

To upload the package on PyPI:

make pip-upload

To run the unit tests run:

make pip-test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c2dataviewer-1.5.0.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

c2dataviewer-1.5.0-py3-none-any.whl (64.6 kB view details)

Uploaded Python 3

File details

Details for the file c2dataviewer-1.5.0.tar.gz.

File metadata

  • Download URL: c2dataviewer-1.5.0.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for c2dataviewer-1.5.0.tar.gz
Algorithm Hash digest
SHA256 8ff423054de2037446766ab41d18d0bda74a62975c3d3be590d206dc6f2cf832
MD5 3e31f1613a03e51bd6546c0d9f2d850d
BLAKE2b-256 e0d9290892cbf8ff0cd17ed83e877169a8b7147046c43619a3e72cc2bf38761d

See more details on using hashes here.

File details

Details for the file c2dataviewer-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: c2dataviewer-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 64.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for c2dataviewer-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dea9453de8e4137d7bf761cf043d6391992a64410eac248d137c59d1041df95a
MD5 b6e1a2ce8e3d0a18defd555c967af64b
BLAKE2b-256 325de722de03f191b8f2f2e2024cbd725a665f9d31797c3f1ec768c6e84566ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page