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.2.tar.gz (38.0 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.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dda_py-0.2.2.tar.gz
  • Upload date:
  • Size: 38.0 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.2.tar.gz
Algorithm Hash digest
SHA256 78111faf9b66a99bbac2f3bb256808c2a1670051fcb690cf5a9a2427bb8f7f02
MD5 d8cd2f8cf5f5c65d76a5d36aa60194a5
BLAKE2b-256 e693df4b5d511f9e99637813f4aef808529b2dc362084d262847e2b9f4ae5cbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dda_py-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c02cd5dc456d9d05b444c4c4997399b8486f63ee38857161fbbf49c8b9631534
MD5 84e598fd00006aeead51e2d98ac84c94
BLAKE2b-256 ba46c4de0a826cec6bce7bc9dcce256a10b67579c79d15f200b2aa7f3fa9f5d0

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