UDA backend for xarray
Project description
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_datasetfunction - 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:
- Tests pass for any new functionality
- Code follows the project's style guidelines (ruff and pylint)
- Documentation is updated as needed
License
MIT License
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 uda_xarray-0.2.1.tar.gz.
File metadata
- Download URL: uda_xarray-0.2.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cb37bfb83e1fa7fa98568467e3f91c5a9fc3134cc67d7b0cda3d0d69f06cb4a
|
|
| MD5 |
cc12558de5c8e932ab2a56d068963980
|
|
| BLAKE2b-256 |
55b3d0ba679d9d6de29d6560f02c516b4bd41ac5c251dd32d41c5278990f9b18
|
Provenance
The following attestation bundles were made for uda_xarray-0.2.1.tar.gz:
Publisher:
publish.yml on samueljackson92/uda-xarray
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uda_xarray-0.2.1.tar.gz -
Subject digest:
4cb37bfb83e1fa7fa98568467e3f91c5a9fc3134cc67d7b0cda3d0d69f06cb4a - Sigstore transparency entry: 902823069
- Sigstore integration time:
-
Permalink:
samueljackson92/uda-xarray@0ea5584507a6abf7d3b8d77e0e04a977f44468b4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/samueljackson92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ea5584507a6abf7d3b8d77e0e04a977f44468b4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file uda_xarray-0.2.1-py3-none-any.whl.
File metadata
- Download URL: uda_xarray-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ded2170248074f4371e70f55c5eff24cd89eff3ebb4dad6a6a4149c7d2d8408
|
|
| MD5 |
efcbe54468c5fb931647c2e706a99061
|
|
| BLAKE2b-256 |
4bbc43e835f92d64613b28d7dfc45b7b2aa2295f6950fa91621407de86100a9a
|
Provenance
The following attestation bundles were made for uda_xarray-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on samueljackson92/uda-xarray
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uda_xarray-0.2.1-py3-none-any.whl -
Subject digest:
0ded2170248074f4371e70f55c5eff24cd89eff3ebb4dad6a6a4149c7d2d8408 - Sigstore transparency entry: 902823134
- Sigstore integration time:
-
Permalink:
samueljackson92/uda-xarray@0ea5584507a6abf7d3b8d77e0e04a977f44468b4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/samueljackson92
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ea5584507a6abf7d3b8d77e0e04a977f44468b4 -
Trigger Event:
workflow_dispatch
-
Statement type: