Skip to main content

sal-xarray

An xarray backend for SAL (Simple Access Layer) that enables seamless integration of SAL data sources with the xarray ecosystem.

Overview

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

Features

  • xarray Integration: Access SAL data using xarray's open_dataset function
  • Automatic Conversion: Converts SAL signals to xarray DataArrays with proper coordinates and metadata
  • Status Mask Handling: Includes status mask data alongside signal data
  • URI-based Access: Simple URI scheme (sal://pulse/<shot_number>/<signal_name>) for accessing data

Installation

pip install sal-xarray

Or using uv:

uv pip install sal-xarray

JET data access requires a VPN connection to the JDC. You will also require a config file at ~/.sal/credentials with the following content:

[https://sal.jetdata.eu]
user=<user-name>
password=<password>

Usage

Open a SAL dataset using xarray:

import xarray as xr

# Open a SAL signal by name and shot number
ds = xr.open_dataset("sal://pulse/87737/ppf/signal/jetppf/magn/ipla", engine="sal")

# Access the data
data = ds["data"]
status = ds["status"]

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

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

The URI format is: sal://pulse/<shot_number>/<signal_name>

Data Structure

When you open a SAL dataset, sal-xarray creates an xarray Dataset with:

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

Development

Setup

Clone the repository and install development dependencies:

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

Running Tests

uv run pytest tests/

Code Quality

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

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

# Run pylint
uv run pylint sal_xarray

# Run ty
uv run ty check sal_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

Metadata

Release files for sal-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 sal-xarray 0.3.0
File Size Uploaded Provenance Actions
sal_xarray-0.3.0.tar.gz 6.7 kB With provenance Details for sal_xarray-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 11.8 kB

Release files / sal_xarray-0.3.0.tar.gz

Download URL sal_xarray-0.3.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d29212479f2f78ed64421256e3391dea251847f87d645fbc2d5a22147aa23fa9
BLAKE2b-256 checksum
How to use checksums
d5e6e62f8c28b8c231e3f5b0be3e0defd2010b3d32edd1a00458ad738e6b619d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

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

Download URL sal_xarray-0.3.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bf4e80492da264e23b0eca907e31421c34b74cfe0819dde5df806abaa9b2bb2
BLAKE2b-256 checksum
How to use checksums
c1bf0437568612f19862f54407708c4c98e559fb25420854e08b898023a10f0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Security for sal-xarray 0.3.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sal_xarray-0.3.0.tar.gz

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 Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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