Package: hcam-devices
hcam_devicesHardware Communication for HiPERCAMThe HiPERCAM project necessitates communicating between numerous hardware components, distributed over
a network.hcam_devicesprovides 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.InstallationInstall with the usual:pip install .or if you don’t have root access:pip install --user .UsageFirst of all, you will need a running WAMP server. I recommendcrossbar. A config file for a crossbar
instance is included with this package in thedatadirectory. Once you have your WAMP server up and running, there are several
scripts that you can run.hwserverThis 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 controlhwloggerSo 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-siteInfluxdatabase. That database can be used with third
party tools likegrafanato enable neat dashboards for device monitoring.hserverThe 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.gtcserverFinally, the external GTC environment (Electronics racks, rotator, telescope offsets etc) are all connected to the WAMP server
using this script.Control within pythonOnce these scripts are running, devices can be controlled in Python. This can be done using a WAMP library likeautobahn.
Alternatively, the WAMP server config included provides a simple HTTP interface that can be used as follows:fromhcam_devices.wamp.utilsimportcall,publish# call RPCsngc_status=call('hipercam.NGC.rpc.summary')call('hipercam.GTC.rpc.do_offset',raoff=0.05,decoff=0.001)# publish to a topicpublish('hipercam.FocalPlaneSlide.target_position',-50)Subscribing to device telemetry must be done using a WAMP library for now.Optional package dependencieshcam_devicessupports several other tools, such as the finding chart toolhfinderand the
instrument control GUIhdriver. Most users will need no extra modules installed. However,
If you want to be able to runhdriver,andyou want full communication with the telescope
whilst running at the GTC, you need to install the CORBA implementationomniORBpy.Full install instructions are found at the omniORB projecthomepage.
Be sure to install both omniORB and omniORBpy. Also, the omniORBpy module and the lib64 variant must
both be in thePYTHONPATH. 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 thePYTHONPATH.Free software: MIT licenseHistory0.1.0 (2020-06-05)First release on PyPI.