Skip to main content

High-performance weather radar data library with Rust core

Project description

Radish Python Bindings

High-performance weather radar data library with Rust core and Python bindings.

Installation

From source

# Install maturin
pip install maturin

# Build and install in development mode
cd python
maturin develop --release

# Or build a wheel
maturin build --release
pip install target/wheels/radish-*.whl

With xarray support

pip install radish[xarray]

Quick Start

Basic Usage

import radish

# Read a CfRadial1 file
volume = radish.read_cfradial1("cfrad.nc")

# Access metadata
print(f"Instrument: {volume.metadata.instrument_name}")
print(f"Sweeps: {volume.num_sweeps}")

# Access sweep data
sweep = volume.get_sweep(0)
print(f"Rays: {sweep.num_rays}, Gates: {sweep.num_gates}")
print(f"Moments: {sweep.moment_names()}")

# Access moment data
dbz = sweep.get_moment("DBZH")
data = dbz.data()  # Returns numpy array
print(f"Reflectivity shape: {data.shape}")

With xarray

from datatree import DataTree

# Open as DataTree
radar = DataTree.open_datatree("cfrad.nc", engine="radish")

# Access sweeps
sweep_0 = radar["sweep_0"].ds

# Work with xarray
sweep_0["DBZH"].plot()

Performance

Radish uses Rust for performance-critical operations:

  • 10-100x faster file parsing than pure Python
  • Memory-efficient data structures
  • Minimal Python overhead

Development

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black radish/
ruff check radish/

# Build documentation
cd docs && make html

License

Licensed under either of:

at your option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

radish_rs-0.1.0-cp312-cp312-manylinux_2_38_x86_64.whl (12.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64

File details

Details for the file radish_rs-0.1.0-cp312-cp312-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for radish_rs-0.1.0-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 37bfb68543b52c9c5ed71b5957193ae64a3fb36c9a0c842400f7e3e211c417ef
MD5 4998fb0577186a3cb970c7588f35f66e
BLAKE2b-256 bc9354725bd183ae39aae43aadbe613d6d757f61861bdb743d25031e03ef1d74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page