Server icon Welcome to kamzik3’s documentation!

Kamzik3 is a modular and lightweight experiment control framework written in Python3.

It is focused on minimalist yet unified way to control and orchestrate wide range of devices used in experimental setup.

It uses ZeroMQ to exchange messages between server and clients. Qt5 is used for the graphical interface. Kamzik3 provides tools for logging, visualizing and evaluation of experimental data. Users can create and execute custom macros and scans using the built-in macro-server.

The experimental setup is defined in one configuration file written in YAML, human-readable data serialization standard.

The framework can be downloaded from PyPI (https://pypi.org/project/kamzik3/).

Documentation

The documentation is available at: https://cfel-sc-public.pages.desy.de/kamzik3/

Requirements

  • Python: 3.8 or 3.9

Python Modules: Backend

  • numpy

  • pyzmq

  • pint

  • bidict

  • pyqt5

  • pyqtgraph

  • pyserial

  • oyaml

  • psutil

  • natsort

  • reportlab

  • pandas

  • tables

Python Modules: Optional

  • pytango

  • pyopengl

  • sysutil

  • pydaqmx

  • pypiwin32

  • rocketchat-API

  • pytest

  • pytest-cov

  • pytest-lazy-fixture

  • pytest-mock

Changelog

v0.7.10

Contributors: Jerome Carnis, Philipp Middendorf, Ivan De Gennaro Aquino

  • Refactor the DevicePicoscale implementation.

  • Bug: compare the user-defined value in inputs fields of exposed methods to the defined limits. Previously limits applied only to the widget arrows.

  • Create the EigerSwTrigger and EigerSwScanner classes, to allow scans with the Eiger using a software trigger.

  • Create a new widget MethodEnabledByAttributeWidget, where the input field of the exposed method can be enabled/disabled by an external boolean attribute.

  • Upgrade the pint library to 0.19.2 (this new version supports inf). As a consequence, Kamzik3 does not support any more Python 3.7.

  • Refactor: move snippetsUnits.device_units to Device.to_device_unit and add unit tests.

  • Implement the DummyTangoDevice. It takes the expected Tango attributes and methods names in the config file. It is useful when one needs to mock the Tango devices.

  • Add the option to provide a step-size in the config file for the DeviceNumAttributeWidget. This is useful for motors where the default step size should be smaller than the default (e.g. risk of collision).

  • Add snippet update_saved_attributes.h5 to update the fields in an existing saved_attributes.h5 file without losing the existing records.

v0.7.9

Contributors: Jerome Carnis, Philipp Middendorf

devices.DeviceEpos:

  • check type of the attributes when reconnecting the device (second call to __init__, type in the YAML mapping may be different).

  • update the position-related attributes only when the device is connected (the position reading is 0 when disconnected, not generating an error).

  • remove inheritance from deviceOSLibrary which is error-prone and does not much

devices.Device:

  • when SAVE_CHANGE, update also the device config (this solves the inconsistency

in configs after reconnection)

Widgets:

  • create DeviceNumAttributeBusyWidget, enabled only when the device status is BUSY (when setpoints can be set only if the device is started, e.g. Chiller)

  • deviceNumAttributeWidget: compare to string “degC” instead of units.degC (pint exception)

  • deviceDebugWidget: add checkbox for returning commands. This avoids crashing hardware not returning anything.

v0.7.8

Contributors: Jerome Carnis

  • Bug fixes for Smaract2, DevicePeakTech, and widgets

  • Added type check with mypy

  • Added linting with pylint

  • Added code formatting with black

v0.7.5

  • Added first test using pytest package.

  • Added support for Eiger detector implemented in Tango.

  • Bug fixes.

v0.7

  • Saved attributes were completely reworked.

  • File format was changed from YAML to HDF5 and GUI was reworked from the ground. Please use converter located in /snippets/snippetSavedAttributes.py to convert your old save file. Or You can use generate_saved_attributes function to generate empty new save file.

See the full Changelog

Example experiment

Copy the content of the /example folder into a writable directory of your choice. Choose that directory as a working directory.

Server icon Start the server:

python server.py

Client icon Start the client:

python client.py

Optionally, you can start the listener:

python listener.py

Templates for the user interface

Many templates are already available for the user interface. You can modify them using Qt designer.

Configuration files

One config file must be provided for each server and another one for the client.

API Documentation

Documentation of the modules included in kamzik3.

Indices and tables