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.0.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.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dda_py-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 120565082c1ff521c21c5dbca62ab72b4b409b428568fcac2a66afbc6e52db3d
MD5 e3272207ab52f3c0423e9832cb472664
BLAKE2b-256 baed43e6179cef6ec4e485d6019961da7d8b9c28bf2992f2dfc3fa5664b76754

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dda_py-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 224a021b8a62467d3c861f09324a69cca2ed85b7cbc547fd4805796e56ec866a
MD5 0339b0122eb490a20b3cf3bd1913eaa7
BLAKE2b-256 37825b5ef51df8bf4eeb2063c430cdd8e7f9d611c2a22c178f2accbac0fd83fa

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