Skip to main content

A GUI for creating mask and q-partition maps for scattering patterns in preparation for SAXS/WAXS/XPCS data reduction

Project description

pySimpleMask

PyPI version

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

  1. Clone the repository:
    git clone https://github.com/AdvancedPhotonSource/pySimpleMask.git
    cd pysimplemask
    
  2. 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

  1. Load Data: Click "Select Raw" or "Load" to open your scattering data file.
  2. 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.
  3. 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.
  4. 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.

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

pysimplemask-0.3.2.tar.gz (78.1 kB view details)

Uploaded Source

Built Distribution

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

pysimplemask-0.3.2-py3-none-any.whl (80.4 kB view details)

Uploaded Python 3

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

Hashes for pysimplemask-0.3.2.tar.gz
Algorithm Hash digest
SHA256 a38a2db91ea1b883450195c624cfa2c5b7eb146288029cce5a2fcc3f0ff292c7
MD5 623b3efcc8d4d1e436f0e8990d79e5a5
BLAKE2b-256 ae462740af2675f7ad497e06fa3400f045638953fe1894bf1d9fc86f19a91b76

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysimplemask-0.3.2.tar.gz:

Publisher: publish.yml on AdvancedPhotonSource/pySimpleMask

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pysimplemask-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6a2777fe0f1b3ec42c34603a0712a1e2577b982cc504df9c071e3bdd7e574aba
MD5 ae49553447a922042dc66bd8d4b8fa85
BLAKE2b-256 23989b903f02a3f189a04bf2f16fd6753e27f87ea516a72efc4743b184c5c8ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysimplemask-0.3.2-py3-none-any.whl:

Publisher: publish.yml on AdvancedPhotonSource/pySimpleMask

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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