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.4.tar.gz (31.6 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.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dda_py-0.2.4.tar.gz
  • Upload date:
  • Size: 31.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for dda_py-0.2.4.tar.gz
Algorithm Hash digest
SHA256 3f557016cbc997522b116a5465629d3685cfd334b29e372caa0759fc1dcb7a1d
MD5 eb85de0fb577ae3d0f38777eb95ef612
BLAKE2b-256 4c1b3c4df7b6b04c06bc366a3c9bd59f692a7b551b960d72e184cf9570153444

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dda_py-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for dda_py-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 feb675cc461b490dd0ed862858e39e1b52a9576a8c7310a4b16e9ce0729dbe91
MD5 61cc289729a6ae41ea7f2ef283f6e5af
BLAKE2b-256 5ad30a57d2ab37fd2d49acf31a6b9de8012a6a81caf793f15074f1ea1f494e17

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