Metadata-Version: 2.4
Name: dda-py
Version: 0.2.3
Summary: Python wrapper for DDA with APE (Actually Portable Executable) binary support
Project-URL: Homepage, https://github.com/sdraeger/dda-py
Project-URL: Repository, https://github.com/sdraeger/dda-py
Project-URL: Issues, https://github.com/sdraeger/dda-py/issues
Author-email: Simon Draeger <sdraeger@salk.edu>
License: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: >=3.6
Requires-Dist: numpy>=1.19.0
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == 'test'
Description-Content-Type: text/markdown

# `dda-py`: Python Wrapper for Delay Differential Analysis

A Python wrapper for DDA with native support for APE (Actually Portable Executable) binaries, enabling cross-platform execution without platform-specific binaries.

## Features

- **APE Binary Support**: Native support for Actually Portable Executable binaries
- **Cross-Platform**: Works on Windows, macOS, and Linux with the same APE binary
- **Async Support**: Both synchronous and asynchronous execution
- **Easy Integration**: Simple Python API for DDA analysis

## Installation

Install the package from PyPI:

```bash
pip install dda-py
```

## Usage

### Basic Usage

```python
import dda_py

# Initialize with APE binary path
dda_py.init("./run_DDA_AsciiEdf")

# Run DDA analysis
Q, output_path = dda_py.run_dda(
    input_file="data.edf",
    channel_list=["1", "2", "3"]
)

print(f"Result shape: {Q.shape}")  # channels × time windows
```

### Using DDARunner Class

```python
from dda_py import DDARunner

# Create runner instance
runner = DDARunner("./run_DDA_AsciiEdf")

# Run analysis with options
Q, output_path = runner.run(
    input_file="data.edf",
    channel_list=["1", "2", "3"],
    bounds=(1000, 5000),  # Optional time bounds
    cpu_time=True         # Enable CPU timing
)
```

### Async Usage

```python
import asyncio
from dda_py import DDARunner

async def analyze_data():
    runner = DDARunner("./run_DDA_AsciiEdf")
    Q, output_path = await runner.run_async(
        input_file="data.edf",
        channel_list=["1", "2", "3"]
    )
    return Q

# Run async
result = asyncio.run(analyze_data())
```

## APE Binary Support

This package is designed to work with APE (Actually Portable Executable) binaries. APE binaries:

- Run on Windows, macOS, and Linux without modification
- No need for platform-specific binaries
- Automatic platform detection and execution

The package automatically handles APE binary execution across different platforms using the appropriate shell interpreter when needed.

## Requirements

- Python 3.6+
- NumPy >= 1.19.0
- DDA APE binary (place in your working directory)
