No description
  • Python 57.9%
  • Rust 40.2%
  • Shell 1.8%
Find a file
Tombleron f0a821399a Merge branch 'feat/station-composition-deploy'
Station composition + declarative deploy: shared controllers/ workspace,
per-station manifests (ngtu_1_1/1_2/1_4), deploy/deploy.sh, and cleanup of
legacy per-station scripts and duplicated Sardana controllers.
2026-07-24 13:40:06 +07:00
controllers feat: migrate ngtu_1_4 (xafs + eld2_axis) into controllers/ and stations/ 2026-07-24 13:12:23 +07:00
deploy fix: deploy.sh sudo-home resolution, idempotent motarem_client copy, root guard 2026-07-24 12:04:44 +07:00
docs docs: add Task 6 (migrate ngtu_1_4) to deploy plan 2026-07-24 13:10:40 +07:00
modules feat: TCP-only device servers with auto-reconnecting client 2026-07-02 11:28:52 +07:00
motarem@67bbb1df4d chore: bump rust_devices (multitorr) and motarem (sim_server) pointers 2026-07-24 13:01:10 +07:00
ngtu_1_1 chore: remove legacy Sardana controllers now canonical under stations/ 2026-07-24 13:22:59 +07:00
ngtu_1_2 chore: remove legacy Sardana controllers now canonical under stations/ 2026-07-24 13:22:59 +07:00
ngtu_1_4 chore: remove legacy Sardana controllers now canonical under stations/ 2026-07-24 13:22:59 +07:00
rust_devices@c16879800c chore: bump rust_devices (multitorr) and motarem (sim_server) pointers 2026-07-24 13:01:10 +07:00
stations feat: migrate ngtu_1_4 (xafs + eld2_axis) into controllers/ and stations/ 2026-07-24 13:12:23 +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: point submodules to Forgejo 2026-06-29 19:21:33 +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"