Skip to content

marcel-goldschen-ohm/xarray-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

243 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xarray-graph

PyQt/PySide UIs for visualizing and manipulating Xarray DataTrees.

GitHub Tag build-test GitHub Release publish

🚧 Under construction! Check back soon.

  • YouTube video(s)?

Contents

Tree GUI for Xarray Datatree

A graphical user interface for visualizing and manipulating Xarray DataTrees.

  • 🚧 YouTube video?

Launch the tree GUI by running the command:

xarray-tree

↑ top

Using DataTree model/view components in your own app

import xarray as xr
from xarray_graph.tree import XarrayDataTreeModel, XarrayDataTreeView

dt = xr.DataTree(...)

model = XarrayDataTreeModel()
model.setDataVarsVisible(True)
model.setCoordsVisible(True)
model.setInheritedCoordsVisible(True)
model.setDetailsColumnVisible(True)
model.setDatatree(dt)

view = XarrayDataTreeView()
view.setModel(model)

↑ top

Graph (x,y) slices of a Xarray Datatree

A graphical user interface for visualizing (x,y) slices (i.e., signal waveforms) of selected Xarray DataArrays in a DataTree.

  • 🚧 YouTube video?

Launch the graph GUI by running the command:

xarray-graph

↑ top

Install

If you are unfamiliar with Python environments, I suggest following the instructions at the end of this section involving the python package manager uv.

Requires a PyQt package. Should work with PySide6 (the official Python Qt binding), PyQt6, or PyQt5 via the QtPy abstraction layer. Note: PySide6>=6.2.2 for Apple silicon support, and PySide6!=6.9.1 due to a bug that is incompatible with pyqtgraph.

pip install "PySide6>=6.2.2,!=6.9.1"

Install latest release version:

pip install --upgrade xarray-graph

Or install latest development version:

pip install --upgrade xarray-graph@git+https://github.com/marcel-goldschen-ohm/xarray-graph

The above should be all you need, but if necessary you can install the exact same environment as in the repo:

  1. Install the python package manager uv.
  2. Download this repo (I suggest downloading the latest release version).
  3. In the downloaded repo directory, run the following commands:
uv sync
uv pip install "PySide6>=6.2.2,!=6.9.1"

Note that if you install with uv, the commands for launching the GUIs will need to be run within the downloaded repo directory and also preceeded by uv run. For example, to launch the tree GUI:

uv run xarray-tree

↑ top

Run

Launch the tree GUI:

xarray-tree

Launch the graph GUI:

xarray-graph

↑ top

Support

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

Buy Me A Coffee

↑ top

About

PyQt/PySide UI for graphing (x,y) slices of Xarray datasets.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors