Metadata-Version: 2.3
Name: xarray-graph
Version: 2026.8.5
Summary: PyQt UIs for Xarray DataTree including tree view and DataArray slice graphing and processing.
Keywords: xarray,DataTree,tree,PyQt,PySide,pyqtgraph,graph,plot,signal processing,n-dimensional
Author: Marcel Goldschen-Ohm
Author-email: Marcel Goldschen-Ohm <goldschen-ohm@utexas.edu>
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: User Interfaces
Requires-Dist: xarray
Requires-Dist: h5netcdf
Requires-Dist: zarr
Requires-Dist: scipy
Requires-Dist: pint
Requires-Dist: lmfit
Requires-Dist: qtpy
Requires-Dist: qtawesome
Requires-Dist: pyqtgraph
Requires-Dist: qtconsole
Requires-Dist: cmap
Requires-Dist: requests
Requires-Dist: cftime
Requires-Dist: pyside6>=6.2.2,!=6.9.1 ; extra == 'qt'
Requires-Python: >=3.10
Project-URL: homepage, https://github.com/marcel-goldschen-ohm/xarray-graph
Project-URL: repository, https://github.com/marcel-goldschen-ohm/xarray-graph
Project-URL: issues, https://github.com/marcel-goldschen-ohm/xarray-graph/issues
Provides-Extra: qt
Description-Content-Type: text/markdown

# xarray-graph
PyQt UIs for Xarray DataTree including tree view and DataArray slice graphing and processing.

![GitHub Tag](https://img.shields.io/github/v/tag/marcel-goldschen-ohm/xarray-graph?cacheSeconds=1)
![test](https://github.com/marcel-goldschen-ohm/xarray-graph/actions/workflows/test.yml/badge.svg)
![GitHub Release](https://img.shields.io/github/v/release/marcel-goldschen-ohm/xarray-graph?include_prereleases&cacheSeconds=1)
![publish](https://github.com/marcel-goldschen-ohm/xarray-graph/actions/workflows/publish.yml/badge.svg)

[<img src="https://github.com/marcel-goldschen-ohm/xarray-graph/blob/main/images/xarray-tree-youtube.png?raw=true" width="50%" style="max-width: 300px">](https://youtu.be/jrO5Khk9ZKY)

:construction: YouTube video for graph app coming soon...

## Contents
- [Install](#install)
- Apps
    - [XarrayDataTreeViewer](#xarraydatatreeviewer): Tree UI for an Xarray DataTree.
    - [XarrayGraph](#xarraygraph): Graph/Iterate/Fit/Analyze (x,y) slices of DataArrays in an Xarray DataTree.
- [Using Xarray DataTree model/view components in your own app](#using-xarray-datatree-modelview-components-in-your-own-app)
- [Support](#support)

## Install
Requires a PyQt package. Should work with PySide6 (the official Python Qt binding), PyQt6, or PyQt5 via the [QtPy](https://github.com/spyder-ide/qtpy) abstraction layer. *Note: PySide6>=6.2.2 for Apple silicon support, and PySide6!=6.9.1 due to a [bug](https://github.com/pyqtgraph/pyqtgraph/issues/3328) that is incompatible with pyqtgraph.*

### Install with uv (recommended):
1. Install the python package manager [uv](https://github.com/astral-sh/uv).
2. Download the [xarray-graph GitHub repository](https://github.com/marcel-goldschen-ohm/xarray-graph). *For now, I suggest downloading the latest version of the repo as it has been under frequent development.* <!-- *I suggest downloading the latest release version.* -->
3. In the downloaded repo directory, run the following commands (e.g., in a Terminal or shell):
```shell
uv sync
uv pip install "PySide6>=6.2.2,!=6.9.1"
```

### Install with pip:
```shell
pip install xarray-graph
pip install "PySide6>=6.2.2,!=6.9.1"
```
<!-- Or install the latest development version:
```shell
pip install --upgrade xarray-graph@git+https://github.com/marcel-goldschen-ohm/xarray-graph
pip install "PySide6>=6.2.2,!=6.9.1"
``` -->

[&uarr; top](#xarray-graph)

## XarrayDataTreeViewer
Tree UI for an Xarray DataTree.

[<img src="https://github.com/marcel-goldschen-ohm/xarray-graph/blob/main/images/xarray-tree-youtube.png?raw=true" width="50%" style="max-width: 300px">](https://youtu.be/jrO5Khk9ZKY)

:rocket: To **launch the application**, run the following command (e.g., in a Terminal or shell) in the downloaded repo directory:
```shell
uv run xarray-tree
```
:warning: If you installed with pip, omit `uv run`.

:bangbang: *Note: The first time you run the app it may take 20-30 seconds to start due to loading/caching of graphics libraries, so be patient. Subsequent runs should start in only a few seconds.*

[&uarr; top](#xarray-graph)

## XarrayGraph
Graph/Iterate/Fit/Analyze (x,y) slices of DataArrays in an Xarray DataTree.

:construction: YouTube video coming soon...

:rocket: To **launch the application**, run the following command (e.g., in a Terminal or shell) in the downloaded repo directory:
```shell
uv run xarray-graph
```
:warning: If you installed with pip, omit `uv run`.

:bangbang: *Note: The first time you run the app it may take 20-30 seconds to start due to loading/caching of graphics libraries, so be patient. Subsequent runs should start in only a few seconds.*

[&uarr; top](#xarray-graph)

## Using Xarray DataTree model/view components in your own app
```python
import xarray as xr
from xarray_graph.tree.XarrayDataTreeModel import XarrayDataTreeModel
from xarray_graph.tree.XarrayDataTreeView import XarrayDataTreeView

dt = xr.DataTree(...)

model = XarrayDataTreeModel()
model.setDatatree(dt)

view = XarrayDataTreeView()
view.setModel(model)

# place view widget in your app as desired
```

[&uarr; top](#xarray-graph)

## Support
This is all done in my free time. If you find it useful, why not buy me a cup of coffee? Cheers!

<a href="https://www.buymeacoffee.com/marcel.goldschen.ohm" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

[&uarr; top](#xarray-graph)