McStas components and tools mimicking ESS Readout Master detector readouts: collect simulated events to HDF5, combine files, and replay them to Event Formation Units
Project description
McStas Readout Master for ESS detectors
Components and tools linking McStas 3.3+ ray-tracing neutron simulations to the ESS data pipeline via the Event Formation Unit (EFU).
Simulated readout records are collected to HDF5 files while the simulation runs, combined across repeated runs or scan points, and replayed to EFUs afterwards, statistically correctly — the data-acquisition stack does not need to be running (or reachable) during the simulation.
Documentation
Guides, per-component parameter references, CLI documentation, and the C/C++ API reference are published at
https://mcdotstar.github.io/mcstas-readout-master/
To build the site locally (requires Doxygen):
cmake -S . -B build-docs -DREADOUT_DOCS_ONLY=ON
cmake --build build-docs --target docs
# open build-docs/docs/html/index.html
Quickstart
1. Install
git clone https://github.com/mcdotstar/mcstas-readout-master.git
cmake -S mcstas-readout-master -B mcstas-readout-master-build -DCMAKE_INSTALL_PREFIX=~/.local
cmake --build mcstas-readout-master-build --target install
This installs libreadout, the readout-config, readout-combine, and
readout-replay tools, and the McStas component files.
2. Collect
Add a Collector* component matching your detector electronics
(CAEN, TTLMonitor, CDT, VMM3, BM0, BM2, BMI) to the end of your instrument's
TRACE section. Identifying values are read by name from particle variables
(typically USER_VARS set in an EXTEND block):
TRACE
...
SEARCH SHELL "readout-config --show compdir"
COMPONENT collect = CollectorCAEN(
ring="ring_id", tube="tube_id", a_name="left", b_name="right",
filename="run", dataset_name="caen_bank0")
AT (0, 0, 0) ABSOLUTE
Each run produces a cue-based HDF5 file; several collectors can share one file, each writing its own named group.
3. Combine
readout-combine validate run_*.h5
readout-combine append --output merged.h5 run_a.h5 run_b.h5 # identical parameters
readout-combine concatenate --output scan.h5 point_*.h5 # scan points
4. Replay
readout-replay --time 2.0 --seed 42 --addr my-efu.example.org --port 9000 scan.h5
Replay steps through the stored points, publishes each point's parameters, draws
n ~ Poisson(w * counting_time) events per stored readout, and sends them to EFUs
resolved from explicit configuration, file-embedded attributes, or the command-line
defaults — in that order. See the
CLI reference for all options.
Legacy runtime streaming
The original per-ray streaming components remain available for use cases where the
EFU runs alongside the simulation: ReadoutCAEN and ReadoutTTLMonitor make a
Poisson-distributed Monte Carlo choice per traced neutron and send packets
immediately, and ReadoutDiscreteCAEN sends an exact number of weighted-sampled
events at the end of the run. Their parameters are documented on the site and in
the component headers (mcdoc-compatible).
MPI support
The Collector* components gather records to the master node, which writes one
HDF5 file. For the streaming Readout* components, all nodes need network access
to the EFU host.
Development
See DEVELOPMENT.md for the development-mode build
(-DREADOUT_DEVELOPMENT_MODE=ON), test suites, and the reasoning behind the
self-locating readout-config.
Use with McStas 3.2
The SEARCH SHELL automatic path modification used above requires McStas 3.3+.
With McStas 3.2, copy the component files into one of the McStas component search
directories and omit the SEARCH SHELL line.
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 Distributions
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 mcstas_readout_master-0.3.3.tar.gz.
File metadata
- Download URL: mcstas_readout_master-0.3.3.tar.gz
- Upload date:
- Size: 305.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab9ed78c26e9ebdc96999e92e1fa6a7ef2a6d9cd0cbfee60ba0f8b552efed328
|
|
| MD5 |
8ca9d89564f6edf1398b7bb108aba70e
|
|
| BLAKE2b-256 |
736f1aa5899c1e187229425c8a5e0b637ab6dbc725d066b297eaf55ba6897a4b
|
Provenance
The following attestation bundles were made for mcstas_readout_master-0.3.3.tar.gz:
Publisher:
wheels.yml on mcdotstar/mcstas-readout-master
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcstas_readout_master-0.3.3.tar.gz -
Subject digest:
ab9ed78c26e9ebdc96999e92e1fa6a7ef2a6d9cd0cbfee60ba0f8b552efed328 - Sigstore transparency entry: 2071589991
- Sigstore integration time:
-
Permalink:
mcdotstar/mcstas-readout-master@c754a1a871787d7230e55773ecb151399f55e88c -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mcdotstar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@c754a1a871787d7230e55773ecb151399f55e88c -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcstas_readout_master-0.3.3-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mcstas_readout_master-0.3.3-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 9.1 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ac5d891a41def96f4da8c757391da1dc5721db4ad01f80ca9d1b56340e71fd5
|
|
| MD5 |
68a646cac4fa63d9f755beedb60201ae
|
|
| BLAKE2b-256 |
8ffd93e3b767001383214e1c755b2be3f4a3a70e14165332ba00be8b0ba0fd85
|
Provenance
The following attestation bundles were made for mcstas_readout_master-0.3.3-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on mcdotstar/mcstas-readout-master
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcstas_readout_master-0.3.3-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
5ac5d891a41def96f4da8c757391da1dc5721db4ad01f80ca9d1b56340e71fd5 - Sigstore transparency entry: 2071590014
- Sigstore integration time:
-
Permalink:
mcdotstar/mcstas-readout-master@c754a1a871787d7230e55773ecb151399f55e88c -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mcdotstar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@c754a1a871787d7230e55773ecb151399f55e88c -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcstas_readout_master-0.3.3-py3-none-macosx_14_0_x86_64.whl.
File metadata
- Download URL: mcstas_readout_master-0.3.3-py3-none-macosx_14_0_x86_64.whl
- Upload date:
- Size: 5.8 MB
- Tags: Python 3, macOS 14.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
267bfe57b032c436b8987bc7d3b5e831f80bedb632b486aead7797edf4d294c9
|
|
| MD5 |
2dae2fd62f2038573a5019fd00b19a2c
|
|
| BLAKE2b-256 |
d15d17a552afbe6877a8c2728d907e636a64f95c9d410af452e4636a303d3c0a
|
Provenance
The following attestation bundles were made for mcstas_readout_master-0.3.3-py3-none-macosx_14_0_x86_64.whl:
Publisher:
wheels.yml on mcdotstar/mcstas-readout-master
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcstas_readout_master-0.3.3-py3-none-macosx_14_0_x86_64.whl -
Subject digest:
267bfe57b032c436b8987bc7d3b5e831f80bedb632b486aead7797edf4d294c9 - Sigstore transparency entry: 2071590035
- Sigstore integration time:
-
Permalink:
mcdotstar/mcstas-readout-master@c754a1a871787d7230e55773ecb151399f55e88c -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mcdotstar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@c754a1a871787d7230e55773ecb151399f55e88c -
Trigger Event:
release
-
Statement type:
File details
Details for the file mcstas_readout_master-0.3.3-py3-none-macosx_14_0_arm64.whl.
File metadata
- Download URL: mcstas_readout_master-0.3.3-py3-none-macosx_14_0_arm64.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
088e9155d5e7cdbe18589bf0a0d4488b082a8203e68a36870761eebf05a16811
|
|
| MD5 |
b478949bb0d337af6740b35bca944a1b
|
|
| BLAKE2b-256 |
1ec98c1006838f27d1b9074037b05c63a29550cd54f0a7515c8fed35813d89d0
|
Provenance
The following attestation bundles were made for mcstas_readout_master-0.3.3-py3-none-macosx_14_0_arm64.whl:
Publisher:
wheels.yml on mcdotstar/mcstas-readout-master
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcstas_readout_master-0.3.3-py3-none-macosx_14_0_arm64.whl -
Subject digest:
088e9155d5e7cdbe18589bf0a0d4488b082a8203e68a36870761eebf05a16811 - Sigstore transparency entry: 2071590058
- Sigstore integration time:
-
Permalink:
mcdotstar/mcstas-readout-master@c754a1a871787d7230e55773ecb151399f55e88c -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mcdotstar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@c754a1a871787d7230e55773ecb151399f55e88c -
Trigger Event:
release
-
Statement type: