Skip to main content

Python wrapper for DDA with APE (Actually Portable Executable) binary support

Project description

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:

pip install dda-py

Usage

Basic Usage

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

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

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)

Project details


Download files

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

Source Distribution

dda_py-0.2.1.tar.gz (7.1 MB view details)

Uploaded Source

Built Distribution

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

dda_py-0.2.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file dda_py-0.2.1.tar.gz.

File metadata

  • Download URL: dda_py-0.2.1.tar.gz
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for dda_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c29c8953e59ec3d9acc0e30aa9219099de0f33433ef3627a459967866729b925
MD5 737b9896beb21ca0c57d541985f051f8
BLAKE2b-256 14c3a5bcfd1bff5696d7435641b88c53fbe593397c4c33279261a733974f4884

See more details on using hashes here.

File details

Details for the file dda_py-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dda_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for dda_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdbd1d42af0cec0fe2f2f888bacdbd9bd09aa4e45f0205fca52ffd26bd1091f7
MD5 95dc20be16fe6b0044a154f1c9228ae3
BLAKE2b-256 44eb745f97868ec4345c60cc5f5893c64006d778c3901b720391d374fd35beae

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