Skip to main content

uda-xarray

An xarray backend for UDA (Universal Data Access) that enables seamless integration of UDA data sources with the xarray ecosystem.

Overview

uda-xarray provides a backend plugin for xarray that allows you to access UDA data sources using xarray's familiar API. It automatically handles the conversion of UDA signals to xarray DataArrays and Datasets, making it easy to work with UDA data in scientific Python workflows.

Features

  • xarray Integration: Access UDA data using xarray's open_dataset function
  • Automatic Conversion: Converts UDA signals to xarray DataArrays with proper coordinates and metadata
  • Error Handling: Includes error data alongside signal data
  • URI-based Access: Simple URI scheme (uda://signal_name:shot) for accessing data

Installation

pip install uda-xarray

Or using uv:

uv pip install uda-xarray

Usage

Open a UDA dataset using xarray:

import xarray as xr

# Open a UDA signal by name and shot number
ds = xr.open_dataset("uda://ip:30421", engine="uda")

# Access the data
data = ds["data"]
errors = ds["error"]

# The dataset includes time coordinates
time = ds["time"]

# Access metadata
units = ds["data"].attrs["units"]
signal_name = ds["data"].attrs["uda_name"]

The URI format is: uda://<signal_name>:<shot_number>

Data Structure

When you open a UDA dataset, uda-xarray creates an xarray Dataset with:

  • data: The signal data as a DataArray
  • error: The error data as a DataArray
  • time: Time coordinates (dimension)
  • attrs: Metadata including units and UDA signal name

Requirements

  • Python >= 3.11, < 3.13
  • uda >= 2.9.2
  • xarray >= 2025.12.0

Development

Setup

Clone the repository and install development dependencies:

git clone https://github.com/samueljackson92/uda-xarray.git
cd uda-xarray
uv sync

Running Tests

pytest tests/

Code Quality

The project uses ruff for linting and formatting, and pylint for additional checks:

# Run ruff
uv run ruff check uda_xarray tests
uv run ruff format uda_xarray tests

# Run pylint
uv run pylint uda_xarray

Contributing

Contributions are welcome! Please ensure:

  1. Tests pass for any new functionality
  2. Code follows the project's style guidelines (ruff and pylint)
  3. Documentation is updated as needed

License

MIT License

Release files for uda-xarray 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uda-xarray 0.3.0
File Size Uploaded
uda_xarray-0.3.0.tar.gz 12.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uda-xarray 0.3.0
File Interpreter ABI Platform
uda_xarray-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / uda_xarray-0.3.0.tar.gz

Download URL uda_xarray-0.3.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bb90682be1409742fc326450bd53720d15c87feeb8062ea213cc0f756175d6fd
BLAKE2b-256 checksum
How to use checksums
ec68f0654fbb1f7af5a657997c8befd3d37f081f6f2fbaa3ae500daa1ec749d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.

Transparency log

Release files / uda_xarray-0.3.0-py3-none-any.whl

Download URL uda_xarray-0.3.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
382b88a9582a8c08c422a227c438a84603389e0686848079a86fa3dc9ff55983
BLAKE2b-256 checksum
How to use checksums
d4678cfdb1d5181865217fd040490a7befb95379231ae2fb5818bbb036f7c3bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page