A GUI for creating mask and q-partition maps for scattering patterns in preparation for SAXS/WAXS/XPCS data reduction
Project description
pySimpleMask
pySimpleMask is a graphical user interface (GUI) tool designed for creating masks and Q-partition maps for scattering patterns, specifically facilitating SAXS, WAXS, and XPCS data reduction.
Features
- Versatile Data Support: Load scattering data from various formats including HDF5, IMM, TIFF, and binary files.
- Interactive Masking:
- Drawing Tools: Create masks using polygons, circles, rectangles, and lines.
- Thresholding: Automatically mask pixels based on intensity limits (low/high).
- Blemish Maps: Apply pre-existing blemish (bad pixel) files.
- Outlier Removal: Automatically detect and mask outliers using SAXS 1D azimuthal average comparisons.
- Manual Selection: Click to mask specific pixels or regions.
- Partition Generation:
- Compute Q-Phi partitions (Dynamic/Static).
- Generate X-Y partitions.
- Support for custom mapping modes.
- Visualization: Real-time visualization of scattering patterns, masks, and SAXS 1D profiles.
- Output:
- Save generated masks as TIFF files.
- Save full partition maps and metadata in Nexus-compatible HDF5/XPCS formats.
Installation
From PyPI
pip install pysimplemask
From Source
- Clone the repository:
git clone https://github.com/AdvancedPhotonSource/pySimpleMask.git cd pysimplemask
- Install the package:
pip install .
Usage
To launch the GUI, simply run the following command in your terminal:
pysimplemask
You can also specify a starting path for data loading:
pysimplemask --path /path/to/your/data
Workflow
- Load Data: Click "Select Raw" or "Load" to open your scattering data file.
- Define Mask:
- Use the "Mask" tabs to apply different masking techniques (Draw, Threshold, Blemish, etc.).
- Combine multiple masking methods as needed.
- Use "Evaluate" to preview the mask and "Apply" to finalize it.
- Compute Partition:
- Go to the "Partition" tab.
- Select the desired mode (e.g., Q-Phi) and configure parameters (number of bins, symmetry).
- Click "Compute Partition" to generate the maps.
- Save Results:
- Click "Save" to export the mask (TIFF) or the full partition data (HDF5).
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
- Author: Miaoqi Chu (mqichu@anl.gov)
- License: BSD 3-Clause 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 pysimplemask-0.3.2.tar.gz.
File metadata
- Download URL: pysimplemask-0.3.2.tar.gz
- Upload date:
- Size: 78.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a38a2db91ea1b883450195c624cfa2c5b7eb146288029cce5a2fcc3f0ff292c7
|
|
| MD5 |
623b3efcc8d4d1e436f0e8990d79e5a5
|
|
| BLAKE2b-256 |
ae462740af2675f7ad497e06fa3400f045638953fe1894bf1d9fc86f19a91b76
|
Provenance
The following attestation bundles were made for pysimplemask-0.3.2.tar.gz:
Publisher:
publish.yml on AdvancedPhotonSource/pySimpleMask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysimplemask-0.3.2.tar.gz -
Subject digest:
a38a2db91ea1b883450195c624cfa2c5b7eb146288029cce5a2fcc3f0ff292c7 - Sigstore transparency entry: 1174897081
- Sigstore integration time:
-
Permalink:
AdvancedPhotonSource/pySimpleMask@1ab723dc687a85f2cc0140ded18cbba7d0326a38 -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/AdvancedPhotonSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1ab723dc687a85f2cc0140ded18cbba7d0326a38 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pysimplemask-0.3.2-py3-none-any.whl.
File metadata
- Download URL: pysimplemask-0.3.2-py3-none-any.whl
- Upload date:
- Size: 80.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a2777fe0f1b3ec42c34603a0712a1e2577b982cc504df9c071e3bdd7e574aba
|
|
| MD5 |
ae49553447a922042dc66bd8d4b8fa85
|
|
| BLAKE2b-256 |
23989b903f02a3f189a04bf2f16fd6753e27f87ea516a72efc4743b184c5c8ae
|
Provenance
The following attestation bundles were made for pysimplemask-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on AdvancedPhotonSource/pySimpleMask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysimplemask-0.3.2-py3-none-any.whl -
Subject digest:
6a2777fe0f1b3ec42c34603a0712a1e2577b982cc504df9c071e3bdd7e574aba - Sigstore transparency entry: 1174897134
- Sigstore integration time:
-
Permalink:
AdvancedPhotonSource/pySimpleMask@1ab723dc687a85f2cc0140ded18cbba7d0326a38 -
Branch / Tag:
refs/tags/0.3.2 - Owner: https://github.com/AdvancedPhotonSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1ab723dc687a85f2cc0140ded18cbba7d0326a38 -
Trigger Event:
push
-
Statement type: