Skip to main content

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 diffraction image files using Dioptas.

Features

  • Folder watch mode for automatic processing of incoming Dioptas-readable image files, 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)

Installation (Recommended)

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

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.
  7. Click Start Watching for automatic mode or Process for manual batch mode.
  8. 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.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dioptas_batch_gui-0.5.5.tar.gz (783.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dioptas_batch_gui-0.5.5-py3-none-any.whl (777.8 kB view details)

Uploaded Python 3

File details

Details for the file dioptas_batch_gui-0.5.5.tar.gz.

File metadata

  • Download URL: dioptas_batch_gui-0.5.5.tar.gz
  • Upload date:
  • Size: 783.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dioptas_batch_gui-0.5.5.tar.gz
Algorithm Hash digest
SHA256 9f6ef7b3b80c7ab7b589336a3c91bdc1a41914eca5f292a0e7db29806a699c2d
MD5 cfe6d773a9be02ecb6899a4e129209cc
BLAKE2b-256 0264bcdbf2c6f85d7536017421f2a69c3f523985ca7451a60efb2f5ddbb095fb

See more details on using hashes here.

File details

Details for the file dioptas_batch_gui-0.5.5-py3-none-any.whl.

File metadata

File hashes

Hashes for dioptas_batch_gui-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e30d5af1ad9915d796fc373ec91bba9fd23598f54f7484007ee26bfea0dbd641
MD5 0ecda2988c10261bb7dc8657cdaed3d3
BLAKE2b-256 8af92b945c2606643e1aa1471009fa58716e6270f5b79475753a8ee778d8e0dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page