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 |
|---|---|---|---|
| Coverage | License | Python | 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
- Load Data: Select a folder containing MDA files
- 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)
- 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
- Fork and clone the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and add tests.
- Run pre-commit and pytest to ensure all checks pass.
- 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9747d10082f02b753fd0f7d11401aa75db48db1a63c20e7f9ed7270c87c5d70
|
|
| MD5 |
a08032b9a25734f82f825d0b3b21db30
|
|
| BLAKE2b-256 |
8c900e7777c40a5f283f62167e66e39cb80bd9375fd06ff48dd7bac2a377e6d4
|
Provenance
The following attestation bundles were made for mdaviz-1.1.3.tar.gz:
Publisher:
pypi.yml on BCDA-APS/mdaviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdaviz-1.1.3.tar.gz -
Subject digest:
b9747d10082f02b753fd0f7d11401aa75db48db1a63c20e7f9ed7270c87c5d70 - Sigstore transparency entry: 320792066
- Sigstore integration time:
-
Permalink:
BCDA-APS/mdaviz@54e849fe25a443b7de869519ddd32204281170dc -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/BCDA-APS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@54e849fe25a443b7de869519ddd32204281170dc -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7777c72049eed1c892f6c9a2791f008b49de2b8e2b1763b05ba307f6c1086946
|
|
| MD5 |
afd1131924a306f018e15f9b4b2b8af1
|
|
| BLAKE2b-256 |
438779213c36a18a2df7b710beaec59d3caf86ec80833d8b51a19751bd99e958
|
Provenance
The following attestation bundles were made for mdaviz-1.1.3-py3-none-any.whl:
Publisher:
pypi.yml on BCDA-APS/mdaviz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdaviz-1.1.3-py3-none-any.whl -
Subject digest:
7777c72049eed1c892f6c9a2791f008b49de2b8e2b1763b05ba307f6c1086946 - Sigstore transparency entry: 320792114
- Sigstore integration time:
-
Permalink:
BCDA-APS/mdaviz@54e849fe25a443b7de869519ddd32204281170dc -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/BCDA-APS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@54e849fe25a443b7de869519ddd32204281170dc -
Trigger Event:
push
-
Statement type: