No description
  • Python 59.5%
  • Rust 36.9%
  • Shell 3.6%
Find a file
2026-05-18 17:18:47 +07:00
docs refactor: split build/install/setup concerns in deploy scripts 2026-05-18 15:41:54 +07:00
modules fix: move DEFAULT_SOCKET_PATH to device class, make socket_path optional 2026-05-18 16:41:09 +07:00
motarem@d9ad4666f0 chore: update motarem submodule pointer 2026-05-18 16:34:20 +07:00
ngtu_1_1 chore: initial monorepo setup 2026-05-18 14:58:02 +07:00
ngtu_1_2 chore: pin sardana==3.0.3 to match server version 2026-05-18 17:18:47 +07:00
ngtu_1_4 chore: pin sardana==3.0.3 to match server version 2026-05-18 17:18:47 +07:00
rust_devices@883fed7155 fix: move Rust controllers into ngtu_1_2 workspace with path deps 2026-05-18 15:07:18 +07:00
tests test: add unit tests for motarem_sardana base classes 2026-05-18 16:23:30 +07:00
.gitignore chore: initial monorepo setup 2026-05-18 14:58:02 +07:00
.gitmodules chore: initial monorepo setup 2026-05-18 14:58:02 +07:00
README.md refactor: split build/install/setup concerns in deploy scripts 2026-05-18 15:41:54 +07:00
requirements-py38.txt fix: make motarem_sardana pip-installable for IDE import resolution 2026-05-18 16:36:25 +07:00

SKIF Beamline Control Software

Monorepo for the SKIF synchrotron beamline control system. Contains Sardana controllers, macros, helper GUIs, and Rust-based device servers for beamlines 1-2 and 1-4.


System Overview

The SKIF control software serves two active experimental stations. Each station runs a set of Rust services that talk directly to hardware over TCP, plus a Python Sardana layer that exposes those services to the control system through Unix domain sockets.

NGTU 1-2 — Non-cooled slit station

Controls three independent hardware subsystems:

Subsystem Rust service What it drives
Slit slit_controller 4-axis non-cooled slit using Standa steppers, RF256 quadrature encoders, and TRID temperature sensors; hardware at 192.168.0.51, 192.168.0.200, 192.168.0.201
Cooled slit cooled_slit_controller 4-axis water-cooled slit using EM2RS servo amplifiers with LIR linear encoders and ICPCON M7015 temperature acquisition; hardware at 192.168.0.61
Filter filter Single-axis beam filter using an EM2RS servo and LIR linear encoder; hardware at 192.168.0.60

Sardana controllers deployed: SlitController.py, EM2RSController.py, LatchController.py. Macros: AllMacro.py. Shared modules: TRID.py, motarem_client/.

NGTU 1-4 — XAFS station

Controls the XAFS (X-ray Absorption Fine Structure) beamline:

Subsystem Rust service What it drives
XAFS xafs 4-axis cooled slit, 1-axis attenuator, collimator temperature readout, and water-inlet monitor; all hardware at 192.168.0.57

Sardana controllers deployed: CooledSlitController.py, Attenuator.py. Shared modules: motarem_client/.


Repository Layout

skif/
├── motarem/          # Rust motion server + Python client (external submodule)
├── rust_devices/     # Rust device crates (external submodule)
├── ngtu_1_1/         # Sardana controllers and macros for beamline 1-1
├── ngtu_1_2/         # Sardana controllers, macros, and Rust services for beamline 1-2
│   ├── slit_controller/          # Rust crate: non-cooled slit
│   ├── cooled_slit_controller/   # Rust crate: cooled slit
│   ├── filter/                   # Rust crate: beam filter
│   ├── services/                 # systemd units for Tango/Sardana
│   └── scripts/                  # deploy and init scripts
├── ngtu_1_4/         # Sardana controllers and Rust service for beamline 1-4
│   ├── xafs/                     # Rust crate: XAFS station backend
│   ├── services/                 # systemd units for Tango/Sardana
│   └── scripts/                  # deploy and init scripts
├── docs/             # Block diagrams and documentation
└── requirements-py38.txt  # Aggregated Python dependencies

External submodules

Path Repository Description
motarem/ github:Tombleron/motarem Rust motion server + Python client
rust_devices/ github:Tombleron/slit_controller Rust crates for hardware devices

Quick Start

For a complete installation walkthrough — prerequisites, first-time setup, hardware configuration, and troubleshooting — see docs/setup.md.

The short version for a routine update of an already-configured station:

git pull --recurse-submodules
./ngtu_1_2/scripts/deploy.sh   # rebuild Rust + redeploy Python for 1-2
./ngtu_1_4/scripts/deploy.sh   # same for 1-4

Updating Submodules

# Pull latest commits for all submodules
git submodule update --remote --merge

# Commit the new submodule pointers
git add motarem rust_devices
git commit -m "chore: bump submodules"