Skip to main content

JAX-Accelerated Aizawa Attractor Analysis with Comprehensive Chaos Metrics

Project description

pattingalloang: A JAX-Accelerated Framework for the Aizawa Strange Attractor

DOI Tests Python 3.9+ PyPI version License: MIT Code style: black

JAX NumPy SciPy Matplotlib Pandas netCDF4

JAX-accelerated Python library for simulating and analyzing the Aizawa strange attractor with comprehensive chaos metrics.

This library is named after Karaeng Pattingalloang III (1600–1654), an eminent scholar-statesman of the Gowa-Tallo Sultanate in South Sulawesi, Indonesia. Serving as Grand Vizier from 1639 until his death, Pattingalloang was renowned throughout the early modern maritime world for his exceptional intellectual pursuits. Contemporary European accounts document his mastery of multiple languages, his extensive library of Western scientific and cartographic works, and his sophisticated engagement with mathematics, astronomy, and natural philosophy. His scholarly reputation earned him the epithet "Father of Makassar" among European observers. This library honors his legacy as a patron of cross-cultural scientific exchange during the Age of Exploration.

Aizawa Attractor Animation

Governing Equations

$$\dot{x} = (z - b)x - dy$$

$$\dot{y} = dx + (z - b)y$$

$$\dot{z} = c + az - \frac{z^3}{3} - (x^2 + y^2)(1 + ez) + fzx^3$$

Standard Parameters: $a=0.95$, $b=0.7$, $c=0.6$, $d=3.5$, $e=0.25$, $f=0.1$

Installation

pip install pattingalloang          # From PyPI
pip install jax[cuda12]             # Optional: GPU support

Quick Start

CLI:

pattingalloang case1              # Standard Aizawa
pattingalloang --all              # Run all 8 cases
pattingalloang case1 --gpu        # GPU acceleration

Python API:

from pattingalloang import AizawaSystem, AizawaSolver, compute_all_metrics

system = AizawaSystem(a=0.95, b=0.7, c=0.6, d=3.5, e=0.25, f=0.1)
solver = AizawaSolver(dt=0.01, use_gpu=False)
result = solver.solve(system, n_steps=80000, initial_state=[0.1, 0.0, 0.0])

lyap_result = solver.solve_with_lyapunov(system, n_steps=30000)
metrics = compute_all_metrics(result['trajectory'], result['time'], 
                              system.params.to_tuple(), dt=0.01,
                              log_diags=lyap_result['log_diags'])

print(f"λ₁={metrics['lyapunov_1']:.4f}, D_KY={metrics['kaplan_yorke_dim']:.4f}")

Test Cases

Case Description Steps Focus
1 Standard Aizawa 80K Classic butterfly structure
2 High Resolution 150K Fine attractor detail
3 Long Trajectory 300K Accurate chaos metrics
4 Parameter Variation 80K Effect of parameter changes
5 Multi-Trajectory 80K Sensitivity to initial conditions
6 Butterfly Wings 120K Wing structure emphasis
7 Chaotic Spiral 100K Spiral-like dynamics
8 Double Loop 100K Double-loop structure

Chaos Metrics

Metric Description
Lyapunov Exponents Rate of trajectory divergence ($\lambda_1 > 0$ → chaos)
Kaplan-Yorke Dimension Fractal dimension from Lyapunov spectrum
Correlation Dimension Grassberger-Procaccia attractor complexity
KS Entropy Information production rate ($\sum \lambda_i$ for $\lambda_i > 0$)
Recurrence Rate Fraction of recurrent points
Determinism Predictability from recurrence plot

Output Files

  • CSV: *_trajectory.csv, *_chaos_metrics.csv
  • NetCDF: CF-compliant with all variables and metadata
  • PNG: High-resolution static visualizations
  • GIF: Animated 3D rotation

License

MIT © Sandy H. S. Herho

Citation

@software{herho2025_pattingalloang,
  title   = {{\texttt{pattingalloang}: A JAX-Accelerated Framework for the Aizawa Strange Attractor}},
  author  = {Herho, Sandy H. S.},
  year    = {2025},
  url     = {https://github.com/sandyherho/pattingalloang}
}

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

pattingalloang-0.0.1.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

pattingalloang-0.0.1-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file pattingalloang-0.0.1.tar.gz.

File metadata

  • Download URL: pattingalloang-0.0.1.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.2 Linux/6.11.9-100.fc39.x86_64

File hashes

Hashes for pattingalloang-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7e7eff7173dd9c41d8e065cca0bfc3134bd11a2659b6ed94d7f07cef5d3af0a1
MD5 7af2a4df80c8e3b3f9fb4c86f3dccdbf
BLAKE2b-256 3dea9eac786171705a9820dd729bd9fd589af748b73ca66412238a9689e8dbaf

See more details on using hashes here.

File details

Details for the file pattingalloang-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pattingalloang-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.2 Linux/6.11.9-100.fc39.x86_64

File hashes

Hashes for pattingalloang-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2643ef3dfe8342f46b56a8293ec8001b05a470fd20eb0db1f890dcb151adde3b
MD5 903b6ad5636e0e04409a56f0a1c8dbaf
BLAKE2b-256 6d5a9e9512744610904d69305317e1c2ade1bc15ed39d02f58ec85a822fb42a3

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