GUI app for automated batch processing of Lambda detector data with Dioptas
Project description
Dioptas Batch Processor GUI
Standalone GUI for automated batch processing of Lambda detector diffraction files using Dioptas.
Features
- Folder watch mode for automatic processing of incoming
.nxs/.h5files - Manual batch mode for selected files
- CHI export (1D integration)
- NPY export (2D cake arrays: intensity, two-theta, azimuth)
- Optional mask support
- Background processing thread to keep GUI responsive
Project Structure
dioptas_batch_gui/
├── dioptas_batch_gui/
│ ├── __init__.py
│ ├── __main__.py
│ ├── version.py
│ ├── gui.py
│ ├── batch_processor.py
│ └── file_watcher.py
├── dbg/
│ ├── __init__.py
│ └── __main__.py
├── check_dependencies.py
├── pyproject.toml
├── requirements.txt
├── LICENSE
├── CHANGELOG.md
├── CONTRIBUTING.md
└── SECURITY.md
Requirements
- Python 3.10+
- conda (recommended for environment management)
Installation (Recommended)
Set up in this order:
- Create and activate a conda environment named
dioptas.
conda create -n dioptas python=3.10 -y
conda activate dioptas
- Install Dioptas first inside that environment.
pip install dioptas
- Install this package.
pip install dioptas-batch-gui
Update to the latest PyPI release
pip install --upgrade dioptas-batch-gui
Force reinstall from PyPI
pip install --upgrade --force-reinstall dioptas-batch-gui
Verify Dependencies
python check_dependencies.py
Usage
Installed CLI commands (work from any directory once your environment is active in terminal or console):
After:
conda activate dioptas
dbg
Compatibility aliases:
dbgui
dioptas_batch_gui
dioptas-batch-gui
For a local checkout, you can also launch the app directly:
python -m dbg
or:
python -m dioptas_batch_gui
Basic Workflow
- Set Watch Directory or switch to Batch Mode and select files manually.
- Choose the output mode:
- Auto uses
<source folder>/processed-YYYY-MM-DD. - Existing directory writes missing products into a selected processed output folder.
- Auto uses
- Select the Calibration File (
.poni). - Optionally select a Mask File.
- Configure integration points and azimuth bins.
- Choose the export options you want.
- Click Start Watching for automatic mode or Process for manual batch mode.
- Click Stop Watching when finished with auto-processing.
Output
For each processed dataset, the app exports:
<base_name>.chi<base_name>-param/<base_name>.int.cake.npy<base_name>-param/<base_name>.tth.cake.npy<base_name>-param/<base_name>.azi.cake.npy<base_name>-param/<base_name>.metadata.v1.json
For HDF5/NXS files containing multiple snapshot images, outputs use a one-based snapshot suffix in the output stem and parameter directory name. When the input stem ends in a numeric scan/index segment, the snapshot suffix is inserted before that final segment:
xxx_map_1_0001.h5snapshot 1:xxx_map_1_001_0001.chixxx_map_1_0001.h5snapshot 2:xxx_map_1_002_0001.chixxx_map_1_001_0001-param/xxx_map_1_001_0001.int.cake.npy
Output layout:
output_directory/
├── <base_name>.chi
└── <base_name>-param/
├── <base_name>.int.cake.npy
├── <base_name>.tth.cake.npy
├── <base_name>.azi.cake.npy
├── <base_name>.metadata.v1.json
└── <calibration>.poni
If the selected output directory already exists, the app inspects the existing
products and writes only missing outputs when overwrite is disabled. Existing
CHI/XY/DAT/NPY products are left untouched. Missing HDF5 metadata exports are
added under the corresponding *-param folder. If an older metadata JSON file
is structurally compatible, missing top-level sections are added conservatively;
if compatibility is uncertain, a versioned metadata JSON file is written instead
of replacing the old file.
The metadata JSON uses schema_version: "1.0" and recursively records HDF5
file attributes, groups, datasets, dataset attributes, group attributes,
NX_class values, source paths, provenance, and a small canonical index for
common coordinates and detector/instrument/scan paths. Large datasets are
described by shape and dtype rather than duplicated inline.
License
GPL-3.0-only. See 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 dioptas_batch_gui-0.5.3.tar.gz.
File metadata
- Download URL: dioptas_batch_gui-0.5.3.tar.gz
- Upload date:
- Size: 781.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efffe58ea5a8f088aa57b768aa210caa96a5b042ee16fa3a1776c51b4ecffe72
|
|
| MD5 |
b736e3f24463d895a6097b6face0f74a
|
|
| BLAKE2b-256 |
ca8bb08dbb641a5de80a05a90253adbe8a9c5f4937161009e1e2e849f854ec95
|
File details
Details for the file dioptas_batch_gui-0.5.3-py3-none-any.whl.
File metadata
- Download URL: dioptas_batch_gui-0.5.3-py3-none-any.whl
- Upload date:
- Size: 776.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3209f25f5f11542efbd51c66b5da0d86d1225d69d4beef0b848fe95e2e2b9a12
|
|
| MD5 |
ec19a717f85066cc031f70bc4812e4a0
|
|
| BLAKE2b-256 |
e7818ec59ac26368832e66dcc0c5c7ad920aa1abf9b7a5fc7ae3df04fd696fca
|