Skip to main content

Python Qt5 application to visualize MDA data.

Project description

mdaviz

Python Qt6 application to visualize mda data.

Status Badges

CI/CD Code Quality Documentation Package
CI Code style: ruff Documentation PyPI version GitHub release
Coverage License Python Pre-commit
codecov License: ANL Python 3.10+ pre-commit

Features

  • Auto-Load Folders: The application automatically loads the first valid folder from your recent folders list when it starts, providing a seamless experience without requiring manual folder selection. You can toggle this feature on/off from the preferences window.
  • Recent Folders: Remembers your recently opened folders for quick access.
  • Lazy Loading: Efficient folder scanning with progress indicators for large datasets.
  • Curve Management: Add, remove, and style multiple data curves.
  • Axis Selection: Select X-axis (positioners), Y-axis (detectors), I0 normalization, and curve unscaling using checkboxes. Axis selection is saved from one file to the next.
  • Curve Unscaling: Rescale curves to match the range of other Y curves for better comparison.
  • Log Scale: Toggle between linear and logarithmic scales for both X and Y axes.
  • Data Analysis: Basic statistics, cursor measurements, and curve fitting.
  • PyQt6 Migration: Complete migration to PyQt6 for future compatibility with Python 3.13+.

Quickstart

Conda environment

It is strongly recommended to use the provided conda environment for development and running the application. This ensures all dependencies (including PyQt6) are available and compatible.

conda env create -f env.yml
conda activate mdaviz
pip install PyQt6 Qt6

Always activate the environment before running, testing, or using pre-commit hooks.

Note: PyQt6 and Qt6 are installed via pip as they are not available in conda-forge for all platforms.

Install & run the application

Mdaviz is available on PyPI:

$ conda activate mdaviz
$ pip install mdaviz

Once installed, you can run the application at any time using:

$ conda activate mdaviz
$ mdaviz

Run the application in developer mode

# Clone the repo
$ git clone https://github.com/BCDA-APS/mdaviz.git
$ cd mdaviz

# Install with development dependencies
$ conda activate mdaviz
$ pip install -e .

# Run the application
$ mdaviz

Usage

Basic Operation

  1. Load Data: Select a folder containing MDA files
  2. Select Axes: Use the checkboxes in the data table to select:
    • X: Positioner for the x-axis (only one can be selected)
    • Y: Detectors for the y-axis (multiple can be selected)
    • I0: Normalization detector (only one can be selected)
    • Un: Unscale curves to match the range of other Y curves (requires Y selection on same row)
  3. Plot Data: Data will automatically plot based on your selection mode

Plot Controls

  • Log Scale: Use the "LogX" and "LogY" checkboxes to switch between linear and logarithmic scales
  • Curve Styling: Select different line styles and markers for your curves
  • Data Manipulation: Apply offset and scaling factors to individual curves
  • Data Analysis: Basic statistics, cursor measurements, and curve fitting.

Plotting Modes

  • Auto-add: New curves are added to existing plots
  • Auto-replace: New curves replace existing plots
  • Auto-off: Manual plotting using buttons

Development

Testing

Run all tests:

pytest src/tests

Current test status:

  • 130 tests passing with 46% coverage
  • 26 failed tests (mostly GUI tests needing fixes)
  • 54 skipped tests (GUI tests in headless environment)
  • 5 test errors (import and setup issues)

Code Quality

The project uses pre-commit hooks for code quality. Run them before committing:

pre-commit run --all-files

Contributing

  1. Fork and clone the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes and add tests.
  4. Run pre-commit and pytest to ensure all checks pass.
  5. Submit a pull request.

For a complete installation guide, see https://bcda-aps.github.io/mdaviz/.

Acknowledgements

"This product includes software produced by UChicago Argonne, LLC under Contract No. DE-AC02-06CH11357 with the Department of Energy."

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

mdaviz-1.1.3.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

mdaviz-1.1.3-py3-none-any.whl (680.6 kB view details)

Uploaded Python 3

File details

Details for the file mdaviz-1.1.3.tar.gz.

File metadata

  • Download URL: mdaviz-1.1.3.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mdaviz-1.1.3.tar.gz
Algorithm Hash digest
SHA256 b9747d10082f02b753fd0f7d11401aa75db48db1a63c20e7f9ed7270c87c5d70
MD5 a08032b9a25734f82f825d0b3b21db30
BLAKE2b-256 8c900e7777c40a5f283f62167e66e39cb80bd9375fd06ff48dd7bac2a377e6d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdaviz-1.1.3.tar.gz:

Publisher: pypi.yml on BCDA-APS/mdaviz

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

File details

Details for the file mdaviz-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: mdaviz-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 680.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mdaviz-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7777c72049eed1c892f6c9a2791f008b49de2b8e2b1763b05ba307f6c1086946
MD5 afd1131924a306f018e15f9b4b2b8af1
BLAKE2b-256 438779213c36a18a2df7b710beaec59d3caf86ec80833d8b51a19751bd99e958

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdaviz-1.1.3-py3-none-any.whl:

Publisher: pypi.yml on BCDA-APS/mdaviz

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