helicity-dynamics
Ô (O-hat): A Cross-Domain Phase Transition Detector
Drop a time series. Get three numbers. Know if your system is stable, heading for trouble, or already broken.
What is Ô?
Ô = (curl, helicity, balance) — three numbers that measure the structural state of any dynamical system, regardless of domain.
| Metric | What it measures | Physics analogue |
|---|---|---|
| curl | Directional change rate | Angular acceleration |
| helicity | Internal winding / structural entanglement | Rotational-to-forward tension ratio |
| balance | Proximity to criticality | Distance from attractor centre |
The framework is substrate-agnostic: it maps any system — physical, economic, geological, or computational — onto the same (curl, helicity, balance) phase-space coordinates.
Validated Across
| System | Domain | Key Finding |
|---|---|---|
| 2D Ising model (L=32–128) | Statistical physics | Binder cumulant crossing at Tc ≈ 2.269 |
| North Anatolian Fault | Seismology | İsmetpaşa 6-station creepmeter network |
| ENSO (El Niño) | Climate | Asymmetric precision (one end accurate) |
| COVID-19 | Epidemiology | Phase transition detection |
| LLM hidden states | AI safety | Jailbreak detection (H_v3) |
| EEG | Neuroscience | High-dimensional structure classification |
| ECG | Medicine | Arrhythmia detection |
| Bearing vibration | Engineering | Fault classification (CWRU, MCC5-THU) |
| Stock indices | Finance | Volatility regime detection |
| Volcanic tremor | Volcanology | Pre-eruptive detection (INGV) |
| …and more |
Installation
pip install helicity-dynamics
Requires Python 3.9+ and numpy.
Quickstart
import numpy as np
import helicity_dynamics as hd
# Any multivariate time series: shape (n_steps, n_features)
data = np.random.randn(200, 5)
# Three numbers
curl, helicity, balance = hd.compute(data)
# Classification
print(hd.classify(helicity, balance))
# → "Type Null: NOISE / BASELINE"
# Full spectrum report
report = hd.spectrum_classify(helicity, balance, curl)
Phase Types (5 + Null)
| Type | Name | Helicity | Balance | What it means |
|---|---|---|---|---|
| I | ORDERED / FERRO | low | low | Strong cooperative order |
| II | QUASI-ORDERED | moderate | moderate | Approaching criticality |
| III | CRITICAL FLUCTUATION | peak | ~0.5 | Maximum fluctuation, infinite correlation |
| IV | QUASI-DISORDERED | declining | moderate-high | Exiting criticality |
| V | DISORDERED / PARA | minimal | high | No cooperative order |
| Null | NOISE / BASELINE | near-zero | N/A | No structural signal |
Ising Model Simulation
from helicity_dynamics import Ising2D, ising_helicity_scan, binder_cumulant
# Create and simulate
ising = Ising2D(L=64, T=2.0)
ising.equilibrate(2000)
configs = ising.sample(n_configs=100, steps_between=50)
# Compute Binder cumulant
U4 = binder_cumulant(configs)
print(f"U4 = {U4:.4f}") # ~0.61 at Tc
# Scan temperature range
results = ising_helicity_scan(L=32, T_range=(1.5, 3.5, 20))
# → T, M, curl, helicity, balance arrays
Cross-Domain Comparison
datasets = {
"Ising_critical": ising_data, # (n_steps, n_features)
"NAF_creep": creepmeter_data, # (n_steps, n_features)
"Stock_VIX": vix_data, # (n_steps, n_features)
}
comparison = hd.compute_cross_domain(datasets)
# → side-by-side Ô values for all systems
Time-Series Utilities
# Load data
data = hd.load_csv("my_data.csv")
# Preprocess
data = hd.normalize(data) # z-score
data = hd.detrend(data) # remove linear trend
# Sliding window analysis
for window in hd.sliding_window(data, window_size=50, step=25):
curl, helicity, balance = hd.compute(window)
# track Ô evolution over time
API Reference
Core
hd.compute(data)→(curl, helicity, balance)hd.reduce(data)→(traj, pca)— PCA reductionhd.curl_timeseries(traj)→ per-step curlhd.helicity_timeseries(traj)→ per-step helicityhd.balance_timeseries(traj)→ per-step balancehd.classify(helicity, balance)→ type stringhd.spectrum_classify(helicity, balance, curl)→ full reporthd.compute_cross_domain(datasets)→ comparison table
Ising
hd.Ising2D(L, T)— 2D Ising simulatorhd.ising_helicity_scan(L, T_range, …)— T-sweep + Ôhd.binder_cumulant(configs)— Binder U₄hd.critical_temperature(L_list, …)— Tc via crossing
Utilities
hd.load_csv(path)— CSV → ndarrayhd.load_npy(path)— .npy/.npz → ndarrayhd.normalize(data)— z-scorehd.detrend(data)— remove linear trendhd.sliding_window(data, window_size, step)— generator
Citation
If you use helicity-dynamics in your research, please cite:
DR & MKP. Ô — Cross-Domain Phase Transition Detector: From 2D Ising Thermal Phase Transition to North Anatolian Fault Creepmeter. Research Note 15, 2026. Zenodo: 10.5281/zenodo.21442523
License
CC BY 4.0
Links
- GitHub: MMDR10/H-Detector
- Zenodo: 10.5281/zenodo.21442523
- Paper + Code: ising_naf_paper/
Metadata
Release files for helicity-dynamics 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| helicity_dynamics-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for helicity_dynamics-1.0.0-py3-none-any.whl |
Release files / helicity_dynamics-1.0.0-py3-none-any.whl
| Download URL | helicity_dynamics-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ef375b46a36b3206811080367e3d6147754d635313c4575edf01a6df2f6933c
|
|
BLAKE2b-256 checksum How to use checksums |
4c509c55176c166ecd856331c2e3564bf4df9ce734f6bb5a9e4acefb4577e5ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for helicity-dynamics 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.