Skip to main content

Dioptas Batch Processor GUI

Standalone GUI for automated batch processing of diffraction image files using Dioptas.

Features

  • Folder watch mode for automatic processing of incoming Dioptas-readable image files in the selected directory only, including .nxs, .h5, .tif, and .tiff
  • 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)

Set up in this order:

  1. Create and activate a conda environment named dioptas.
conda create -n dioptas python=3.10 -y
conda activate dioptas
  1. Install Dioptas first inside that environment.
pip install dioptas
  1. Install this package.
pip install dioptas-batch-gui

Local standalone build

To build a standalone application on your computer:

python -m pip install -e ".[build]"
python -m PyInstaller --noconfirm --clean packaging/dioptas_batch_gui.spec

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

  1. Set Watch Directory or switch to Batch Mode and select files manually.
  2. Choose the output mode:
    • Auto uses <source folder>/processed-YYYY-MM-DD.
    • Existing directory writes missing products into a selected processed output folder.
  3. Select the Calibration File (.poni).
  4. Optionally select a Mask File.
  5. Configure integration points and azimuth bins.
  6. Choose the export options you want. In Batch Mode, use Parallel processing to choose serial or parallel processing and set the number of workers. Parallel processing is unchecked by default; enabling it starts with two workers. The maximum is limited by CPU count and installed memory (up to three workers). Each worker has its own Dioptas configuration, so parallel processing uses more memory. Batch workers can split snapshots from one multi-frame HDF5 file or process separate file sets concurrently, including a mix of single-frame and multi-frame HDF5 files. Sequence Mode and Watch Mode run serially. The Batch progress bar counts snapshots after their selected outputs finish; failed snapshots remain below the total and are reported in the status and log. When the safe maximum is two, the Batch tab displays that limit as text; uncheck Parallel processing to run serially.
  7. Click Start Watching for automatic mode or Process for manual batch mode.
  8. Click Stop Watching when finished with auto-processing.

In Batch Mode, Abort asks for confirmation. An interrupted snapshot can leave incomplete or inconsistent output files. To rerun the selected data after aborting, check Overwrite existing files and process the entire batch again.

The app restores field values, output and mask options, the active tab, selected batch and sequence files, and file-list statuses when reopened. Watch and processing jobs do not restart automatically.

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.h5 snapshot 1: xxx_map_1_001_0001.chi
  • xxx_map_1_0001.h5 snapshot 2: xxx_map_1_002_0001.chi
  • xxx_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 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. For non-HDF5 image files, the metadata export records generic source file details such as path, name, size, modification time, and extension.

License

GPL-3.0-only. See LICENSE.

Metadata

Release files for dioptas-batch-gui 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dioptas-batch-gui 0.6.1
File Size Uploaded Provenance Actions
dioptas_batch_gui-0.6.1.tar.gz 799.7 kB Without provenance Details for dioptas_batch_gui-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dioptas-batch-gui 0.6.1
File Interpreter ABI Platform Actions
dioptas_batch_gui-0.6.1-py3-none-any.whl Python 3 none any Details for dioptas_batch_gui-0.6.1-py3-none-any.whl

Total release size: 1.6 MB

Release files / dioptas_batch_gui-0.6.1.tar.gz

Download URL dioptas_batch_gui-0.6.1.tar.gz
Size 799.7 kB
Tags Source
SHA-256 checksum
How to use checksums
95ae333731cf2e4b9d4e241f81bb12bc9bd3d2c6a1d44177bb1145aaffde3524
BLAKE2b-256 checksum
How to use checksums
442f9b6273b84d7f4b1d701c6f90a5432d4945c630a4fdd7d213aef0157b0538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / dioptas_batch_gui-0.6.1-py3-none-any.whl

Download URL dioptas_batch_gui-0.6.1-py3-none-any.whl
Size 786.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0fdfe865f17fd65c2093bb95f7edf0ddfe02a1f1f6587b4b63bc8d555df0aed
BLAKE2b-256 checksum
How to use checksums
155a97ccc4019e8f98ac7389db0c2465bb3e5cee9841d09a4a11c83ca39ef963
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Security for dioptas-batch-gui 0.6.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page