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.
Metadata
Release files for fws-daemon 3.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fws_daemon-3.3.1.tar.gz | 42.2 kB | Without provenance | Details for fws_daemon-3.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fws_daemon-3.3.1-py3-none-any.whl | Python 3 | none | any | Details for fws_daemon-3.3.1-py3-none-any.whl |
Total release size: 94.4 kB
Release files / fws_daemon-3.3.1.tar.gz
| Download URL | fws_daemon-3.3.1.tar.gz |
|---|---|
| Size | 42.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2d383532bb90e761a0030bb569d4d6ac2a4988a907e1af390fcae64eb285aef
|
|
BLAKE2b-256 checksum How to use checksums |
128608325c6ea4a7aba5a41f61632d10e712b5ee19d2e7ec022019df3f88efe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / fws_daemon-3.3.1-py3-none-any.whl
| Download URL | fws_daemon-3.3.1-py3-none-any.whl |
|---|---|
| Size | 52.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d95d45166d1fa7220c265af1e7b90359ddd0a4aad87106d81d6717e6f335eb8
|
|
BLAKE2b-256 checksum How to use checksums |
cb7fc441b6eecf4e257e4cf9a200986ab08cd304d0e8f917fcc80e2a577a26ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for fws-daemon 3.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.