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.2.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.2-py3-none-any.whl (680.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdaviz-1.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 f0a477d6ed064c5a6f9b12dde57e8ddc4a05584db263154f0cfeb5dfd264fe61
MD5 026b166ac692b653a1c68436b93c06df
BLAKE2b-256 7cfa80910c10af7a47256da6a600d42fd8d22877647cc5ab3d0f32a4fd1f745c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdaviz-1.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: mdaviz-1.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 69c05582a6e35b9e94089232f3ecbed38a582e43ce0c5fd2c37a7ffb8a84536d
MD5 d38a7072c0504693d9a1d608de62e8b9
BLAKE2b-256 e43bb8e0e3b64d5ca59a22326243b19983cb760b9748bb996b336abd4ef91440

See more details on using hashes here.

Provenance

The following attestation bundles were made for mdaviz-1.1.2-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