No description
  • Python 61.8%
  • Rust 35.7%
  • Shell 2.3%
  • Dockerfile 0.1%
Find a file
2026-10-24 17:47:28 +07:00
.vscode для запуска черз вскоде 2026-10-24 17:47:28 +07:00
controllers fix(1-4): ELD gear scale, swapped limit bits, wait for INP 2026-10-24 16:45:54 +07:00
deploy feat(1-1): Sardana 3.5 in a venv to match the shared DB clients 2026-10-17 12:49:44 +07:00
docs fix(1-4): ELD gear scale, swapped limit bits, wait for INP 2026-10-24 16:45:54 +07:00
modules fix(motarem_sardana): stop the axis on Abort 2026-10-10 17:28:01 +07:00
motarem@d8c4d1b6ff chore: bump motarem (GUI on PyQt5) 2026-10-10 17:28:01 +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@e4f8c04f24 fix(1-4): ELD gear scale, swapped limit bits, wait for INP 2026-10-24 16:45:54 +07:00
scripts для запуска черз вскоде 2026-10-24 17:47:28 +07:00
stations fix(1-4): ELD gear scale, swapped limit bits, wait for INP 2026-10-24 16:45:54 +07:00
tests test: container check that Sardana loads a station's controllers 2026-09-07 15:26:10 +07:00
.gitignore для запуска черз вскоде 2026-10-24 17:47:28 +07:00
.gitmodules chore: point submodules to Forgejo 2026-06-29 19:21:33 +07:00
CLAUDE.md feat(1-1): Sardana 3.5 in a venv to match the shared DB clients 2026-10-17 12:49:44 +07:00
README.md docs: add Windows testing guide and PowerShell launch scripts 2026-08-30 13:00:01 +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.

For running the software natively on Windows during acceptance testing, see docs/windows-testing.md and the launch scripts in scripts/windows/.

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"