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 Build Status Documentation Status

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.1.tar.gz (72.2 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.1-py3-none-any.whl (75.7 kB view details)

Uploaded Python 3

File details

Details for the file pysimplemask-0.3.1.tar.gz.

File metadata

  • Download URL: pysimplemask-0.3.1.tar.gz
  • Upload date:
  • Size: 72.2 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.1.tar.gz
Algorithm Hash digest
SHA256 bc29b61bda6704e5254ee24db6b7649be114eee73f9392c2c0b9825db7b201a3
MD5 63cdd429f21664bb2e873e4aa86ccd85
BLAKE2b-256 b11005f5286eeb3d6b192333c9a1ae975c589007e3fa993b7a1877d92cbae725

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysimplemask-0.3.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pysimplemask-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 75.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3ce7ed9e6eb9b89dfbb0dc7e8ccad879ef8ddf537be4b0de71f29799ded76b2
MD5 f0c0fa09ff9d6d662a178562308cf37a
BLAKE2b-256 58e176ce6b7fddbad7a27a229c440fe98969a4384300067d1e870d9796ce9ba6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysimplemask-0.3.1-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