Automated live data reduction service for neutron scattering beamlines.
LiveReduce provides a daemon-based system for processing neutron scattering data in real-time as it arrives from the Data Acquisition System (DAS). It uses Mantid's StartLiveData and MonitorLiveData algorithms to process data chunks and accumulate results continuously during experimental runs.
- Complete User and Developer Guide - Start here for comprehensive documentation
- Architecture - System design and data flow
- Configuration Reference - All configuration options
- Processing Scripts - Writing data processing scripts
- Troubleshooting - Solving common problems
- Install the service:
sudo dnf install python-livereduce- Configure: Create
/etc/livereduce.conf
{
"instrument": "POWGEN",
"CONDA_ENV": "mantid"
}- Start:
sudo systemctl start livereduce
sudo systemctl status livereduceSee the Developer Guide for detailed installation instructions.
See CONTRIBUTING.md and the Developer Guide.
The configuration is automatically read from /etc/livereduce.conf. A minimal configuration requires only the instrument name:
{
"instrument": "POWGEN",
"CONDA_ENV": "mantid"
}See Configuration Reference for all options.
# Start/stop/restart
sudo systemctl start livereduce
sudo systemctl stop livereduce
sudo systemctl restart livereduce
# Check status
systemctl status livereduce
# View logs
tail -f /var/log/SNS_applications/livereduce.log
sudo journalctl -u livereduce -fLiveReduce executes instrument-specific Python scripts:
reduce_<INSTRUMENT>_live_proc.py- Processes each data chunkreduce_<INSTRUMENT>_live_post_proc.py- Processes accumulated data
Example for NOMAD:
/SNS/NOM/shared/livereduce/reduce_NOM_live_proc.py/SNS/NOM/shared/livereduce/reduce_NOM_live_post_proc.py
See Processing Scripts for writing these scripts.
The optional watchdog service monitors the main daemon and restarts it if unresponsive:
sudo dnf install python-livereduce-watchdog
sudo systemctl enable livereduce_watchdog
sudo systemctl start livereduce_watchdogConfigure in /etc/livereduce.conf:
{
"watchdog": {
"interval": 60,
"threshold": 300
}
}Information and ideas taken from:
- StatisticsService
- autoreduce
- post_processing_agent
- Logging in python
- systemd documentation