pattingalloang: A JAX-Accelerated Framework for the Aizawa Strange Attractor
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.
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 7 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 |
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}
}
Metadata
Release files for pattingalloang 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pattingalloang-0.0.2.tar.gz | 29.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pattingalloang-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.2 kB
Release files / pattingalloang-0.0.2.tar.gz
| Download URL | pattingalloang-0.0.2.tar.gz |
|---|---|
| Size | 29.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8b418ddf3d9e14c4c6ee7e0430811dd1de59ecc217616c618547a0327990e7d
|
|
BLAKE2b-256 checksum How to use checksums |
e165ebee1e05efadc1d034cac2608d597f0d07a6b4b1548241d1751409d4f788
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.11.14 Linux/6.11.9-100.fc39.x86_64
|
Release files / pattingalloang-0.0.2-py3-none-any.whl
| Download URL | pattingalloang-0.0.2-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca38000cfd178f80cf95c13f9781bfced69182dc2f02f3a2dda976a78db38671
|
|
BLAKE2b-256 checksum How to use checksums |
c3a9c809f087fecba63caa2292c0968450b40e9d28627814a90c9ca2fba39be1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.11.14 Linux/6.11.9-100.fc39.x86_64
|