FWS scan daemon and analysis tools
Project description
fws-daemon
fws-daemon is a Python-EPICS daemon that provides scan and analysis toolkit functionalities for the FWS system.
It orchestrates scan execution through fws_daemon/scan, collects
and post-processes scan data, and writes structured HDF5 output for
offline analysis.
What this project includes
fws-daemonCLI: runs the scan daemonfws-plotCLI: opens interactive plotting tools for produced HDF5 files- Typed scan configuration and orchestration modules
- Callback pipeline for scan status, Gaussian fitting, and HDF5 writing
- Tests for orchestration, callbacks, interface mapping, and packaging
Installation
Install from the repository root:
pip install .
This installs the console scripts:
fws-daemonfws-plot
For development environment setup and editable installs, see
docs/development.md.
Quick start
Run daemon for scanner index 1:
fws-daemon 1
Run in test mode:
fws-daemon 1 --test-mode
Write daemon logs to a custom directory:
fws-daemon 1 --log-dir /tmp/fws-daemon
Open plots from an HDF5 file:
fws-plot /path/to/scan.h5 PDB --iops-channel ch1 --scanner-index 1
CLI reference
fws-daemon
fws-daemon <scanner_index> [--test-mode] [--custom-callback PATH]
[--log-dir PATH]
Arguments:
scanner_index(int): FWS scanner number--test-mode: useTest:*PV prefixes--custom-callback: Python file exposingget_pre_callbackand/orget_post_callback. This executes arbitrary Python from the provided file path; only use trusted scripts.--log-dir: daemon log directory (default:var/log/fws-daemon/fws-<NN>for the selected scanner index). Use a writable path if the default location is not permitted on your host.
fws-plot
fws-plot <file_path> <struck_channel>
[--iops-channel CH1|CH2] [--scanner-index N]
Arguments:
file_path: path to an HDF5 scan filestruck_channel: DAQ channel (for examplePDB,PDT)--iops-channel: optional IOPS channel, defaults toch1--scanner-index: optional scanner index (auto-detected from filename when omitted)
Architecture overview
The runtime flow for fws-daemon:
- Parse daemon CLI args and resolve IOC prefixes.
- Build
FWSScanInterfaceand startFWSScanBridgeDaemon. - Read scan inputs from EPICS PVs and validate into
ScanConfig. - Plan scan positions with
ScanPlanner. - Execute each step with
FWSScanRunner. - Collect PV data with
ScanDataCollector. - Run callbacks:
ScanStatusCallbackGaussFitCallbackHDF5WriterCallback
- Persist data and metadata to HDF5.
For deeper details see:
docs/architecture.mddocs/development.mddocs/operations.mdCONTRIBUTING.md
HDF5 output model (high level)
- Root-level metadata attributes (scan args, user, start time, source)
- Per-scan groups (
scan_001,scan_002, ...) - Nested data groups (
scan,struck,idc,beam, etc.) with datasets and engineering units where available
Development and testing
Run tests:
pytest -v
Coverage thresholds and test options are configured in pytest.ini.
Before running tests locally, make sure dependencies are installed in your
active environment.
Repository layout
fws_daemon/
daemon/ # bridge daemon, interface mapping, callbacks, entrypoint
scan/ # scan config, planner, runner, orchestration
plots/ # interactive plot tools and CLI
utils/ # fitting and path/filename helpers
tests/ # unit and integration tests
License
No license file is currently present in this repository. If you intend to
distribute this package externally, add an explicit LICENSE file and ensure
pyproject.toml metadata matches the chosen license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fws_daemon-3.3.0.tar.gz.
File metadata
- Download URL: fws_daemon-3.3.0.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1998728d19ba08b2e10a1bde3334def795f585ab0e48b563a435016ed9323573
|
|
| MD5 |
5c48f13a50866c81e63d9c87c02bb242
|
|
| BLAKE2b-256 |
7164eb970457003008db3e51001bf9d8ab7e8c649b37e204f8f40d523225ad1f
|
File details
Details for the file fws_daemon-3.3.0-py3-none-any.whl.
File metadata
- Download URL: fws_daemon-3.3.0-py3-none-any.whl
- Upload date:
- Size: 52.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ec04e8701d355d771d4d272d17a1c162e41941a7e4f11f67021b6ba99fdfb4f
|
|
| MD5 |
09d1ffeaf999a3be432f2e69dd71c4dd
|
|
| BLAKE2b-256 |
bd2a84203c7aeb1064e7cf4e1fbecf98b5a9a7bb9fac2ded1caf14efffc78258
|