Skip to main content

hypersynchronization is a Python library for the simulation, analysis, and visualization of synchronization in oscillators with higher-order interactions.

Project description

hypersynchronization

hypersynchronization is a Python library for the simulation, analysis, and visualization of oscillators with group (higher-order) interactions.

Getting started

Here is a simple example to get started:

import matplotlib.pyplot as plt
import numpy as np
import seaborn as sb
import xgi

import hypersynchronization as hs

sb.set_theme(style="ticks", context="notebook")

# structural parameters 
N = 20 # number of nodes
H = xgi.random_simplicial_complex(N, ps=[0.01, 0.015], seed=1) # hypergraph
links = H.edges.filterby("order", 1).members()
triangles = H.edges.filterby("order", 2).members()

# dynamical parameters
k1 = 5  # pairwise coupling strength
k2 = 0.1  # triplet coupling strength

# integration parameters
t_end = 300
dt = 0.01
integrator = "RK45"

# generate initial contitions
theta_0 = hs.generate_state(N, kind="random")

# simulate system
thetas, times = hs.simulate_kuramoto(
    H,
    omega=np.random.normal(size=N),
    theta_0=theta_0,
    t_end=t_end,
    dt=dt,
    rhs=hs.rhs_23_sym, 
    integrator=integrator,
    args=(k1, k2, links, triangles), # arguments of the RHS function,
)


hs.plot_summary(thetas, times, H)

plt.show()

Credits

hypersynchronization makes use of XGI for higher-order interactions and Scipy's solve_ivp() for ODE integration.

Released under the 3-Clause BSD license.

Maxime Lucas: maxime.lucas.work [at] gmail.com

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypersynchronization-0.2.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

hypersynchronization-0.2-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file hypersynchronization-0.2.tar.gz.

File metadata

  • Download URL: hypersynchronization-0.2.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for hypersynchronization-0.2.tar.gz
Algorithm Hash digest
SHA256 4496f1fbe61df9271e536a2cfd353ecc3e7362f01b4906066eb0bc8228994d83
MD5 528c8c0f99b2147e4f87532a5eb66db9
BLAKE2b-256 a173f592c3370ee5385208491d55483f4d5ae34642a0220a39bf79b32fb0857d

See more details on using hashes here.

File details

Details for the file hypersynchronization-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for hypersynchronization-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 683795e626982d40375f7cd160c031d802e7c90fcb67a51915da553dfd39d51a
MD5 ee13993019c4da90a613d816fe681eaa
BLAKE2b-256 5bf3cfb5543cb6707dff1c9b252e67bc886ad09f20c825d900e31cb61ef6ef60

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