Metadata-Version: 2.4
Name: radish-rs
Version: 0.2.2
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Requires-Dist: numpy>=1.20
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-cov>=4.0 ; extra == 'dev'
Requires-Dist: black>=23.0 ; extra == 'dev'
Requires-Dist: ruff>=0.1.0 ; extra == 'dev'
Requires-Dist: xarray>=2024.10 ; extra == 'xarray'
Provides-Extra: dev
Provides-Extra: xarray
Summary: High-performance weather radar data library with Rust core
Keywords: radar,weather,cfradial,meteorology,netcdf
Author-email: Alfonso Ladino <alfonso@atmoscale.ai>, Maxwell Grover <maxwell.grover@anl.gov>
License: MIT OR Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/aladinor/radish
Project-URL: Issues, https://github.com/aladinor/radish/issues
Project-URL: Repository, https://github.com/aladinor/radish

# Radish Python Bindings

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

## Installation

### From source

```bash
# 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

```bash
pip install radish[xarray]
```

## Quick Start

### Basic Usage

```python
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

```python
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

```bash
# 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:

- Apache License, Version 2.0 ([LICENSE-APACHE](../LICENSE-APACHE))
- MIT license ([LICENSE-MIT](../LICENSE-MIT))

at your option.

