Skip to main content

hcam_devices

https://img.shields.io/pypi/v/hcam_devices.svg https://img.shields.io/travis/StuartLittlefair/hcam_devices.svg Documentation Status Updates

Hardware Communication for HiPERCAM

The HiPERCAM project necessitates communicating between numerous hardware components, distributed over a network. hcam_devices provides a set of tools to allow devices on the network to run and communicate with each other.

The architecture uses a central WAMP server (e.g. crossbar) to handle communication over websockets. Devices on the network publish telemetry regularly to the WAMP server, and any interested party can subcribe to the telemetry topic to receive updates.

Devices can expose Remote Procedure Calls (RPCs) so that they may be controlled over the network, and also subscribe to topics, so that settable attributes (e.g the temperature setpoint of a CCD) can be cpontrolled by publishing to those topics.

Installation

Install with the usual:

pip install .

or if you don’t have root access:

pip install --user .

Usage

First of all, you will need a running WAMP server. I recommend crossbar. A config file for a crossbar instance is included with this package in the data directory. Once you have your WAMP server up and running, there are several scripts that you can run.

hwserver

This program runs the HiPERCAM peripheral hardware (e.g the CCD peltier controllers, focal plane slide, flow sensors etc). Running this script will connect these devices to the WAMP server and allow monitoring and control

hwlogger

So that the devices (especially the CCD heads) can be monitored off-site, this script subscribes to the CCD telemetry and saves the hardware state to a persistent off-site Influx database. That database can be used with third party tools like grafana to enable neat dashboards for device monitoring.

hserver

The NGC CCD controller is responsible for driving the CCDs, saving exposures etc. For maximum reliability and speed, this device is connected to the WAMP server and controlled via it’s own custom script, hserver.

gtcserver

Finally, the external GTC environment (Electronics racks, rotator, telescope offsets etc) are all connected to the WAMP server using this script.

Control within python

Once these scripts are running, devices can be controlled in Python. This can be done using a WAMP library like autobahn. Alternatively, the WAMP server config included provides a simple HTTP interface that can be used as follows:

from hcam_devices.wamp.utils import call, publish

# call RPCs
ngc_status = call('hipercam.NGC.rpc.summary')
call('hipercam.GTC.rpc.do_offset', raoff=0.05, decoff=0.001)

# publish to a topic
publish('hipercam.FocalPlaneSlide.target_position', -50)

Subscribing to device telemetry must be done using a WAMP library for now.

Optional package dependencies

hcam_devices supports several other tools, such as the finding chart tool hfinder and the instrument control GUI hdriver. Most users will need no extra modules installed. However, If you want to be able to run hdriver, and you want full communication with the telescope whilst running at the GTC, you need to install the CORBA implementation omniORBpy.

Full install instructions are found at the omniORB project homepage. Be sure to install both omniORB and omniORBpy. Also, the omniORBpy module and the lib64 variant must both be in the PYTHONPATH. Finally, communicating with the GTC requires the installation of Interface Definition Language (IDL) files, and the python modules compiled from them. Contact S. Littlefair for these files, which must also be in the PYTHONPATH.

  • Free software: MIT license

History

0.1.0 (2020-06-05)

  • First release on PyPI.

Metadata

Release files for hcam-devices 1.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hcam-devices 1.7.2
File Size Uploaded
hcam_devices-1.7.2.tar.gz 68.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hcam-devices 1.7.2
File Interpreter ABI Platform
hcam_devices-1.7.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 151.3 kB

Release files / hcam_devices-1.7.2.tar.gz

Download URL hcam_devices-1.7.2.tar.gz
Size 68.1 kB
Tags Source
SHA-256 checksum
How to use checksums
17130bbb3ae94b9b7993175a7eb4a55c5a815302f19d8e759b85823d755e073e
BLAKE2b-256 checksum
How to use checksums
1732989b4d88aa78d4f6209b2f4b21a9c0172456eb85ce3db58f6859cf41c1ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / hcam_devices-1.7.2-py2.py3-none-any.whl

Download URL hcam_devices-1.7.2-py2.py3-none-any.whl
Size 83.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4a02e28d4fd29bf3e6e399fb9217bed01dd5be4425909822bf7db943bd33816f
BLAKE2b-256 checksum
How to use checksums
6869baf6223c1a504d89601970734fe0f852e8275c32c3d3e41e31dfaf083047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release history Release notifications | RSS feed

1.7.4

2 release files

1.7.3

2 release files

This release

1.7.2 This release

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page