API reference#

Simulation#

simulate_kuramoto(H[, omega, theta_0, ...])

Simulate the Kuramoto model on a hypergraph.

Initial conditions#

generate_state(N[, kind, noise, seed])

Generate initial conditions for a system of N oscillators.

generate_k_clusters(N, k, ps[, noise, seed])

Generate a k-cluster state for N phase oscillators.

generate_q_twisted_state(N, q[, noise, seed])

Generate a q-twisted state for N phase oscillators.

RHS functions#

rhs_23_sym(t, theta, omega, k1, k2, links, ...)

Right-hand side of the ODE for any hypergraph with links and triangles.

rhs_pairwise_a2a(t, theta, omega, k1)

Right-hand side of the ODE, all-to-all pairwise coupling.

rhs_pairwise_meso(t, theta, omega, k1, links)

Right-hand side of the ODE, pairwise coupling on an arbitrary network.

rhs_pairwise_adj(t, theta, omega, k1, adj1)

Right-hand side of the ODE, pairwise coupling on an arbitrary network.

rhs_pairwise_a2a_harmonic(t, theta, omega, ...)

Right-hand side of the ODE, all-to-all pairwise coupling with a harmonic.

rhs_triplet_sym_meso(t, theta, omega, k2, ...)

Right-hand side of the ODE, symmetric triadic coupling on an arbitrary network.

rhs_triplet_asym_meso(t, theta, omega, k2, ...)

Right-hand side of the ODE, asymmetric triadic coupling on an arbitrary network.

rhs_23_sym_nb(t, theta, omega, k1, k2)

ODE RHS for coupled oscillators on a complete network.

rhs_23_asym_nb(t, theta, omega, k1, k2)

ODE RHS for coupled oscillators on a complete network.

rhs_ring_23_sym_nb(t, theta, omega, k1, k2, r)

ODE RHS for coupled oscillators on a ring network.

rhs_ring_23_asym_nb(t, theta, omega, k1, k2, r)

ODE RHS for coupled oscillators on a ring network.

Analysis#

order_parameter(thetas[, order, complex, axis])

Calculate the generalised Daido order parameter of order order.

identify_state(thetas[, atol])

Identify the synchronization state.

identify_k_clusters(thetas, k[, atol])

Check if k-cluster state.

identify_q_twisted(thetas[, atol])

Check if twisted state and identify its winding number.

Drawing#

plot_summary(thetas, times, H)

plot_sync(thetas, times[, n, figsize, ...])

Plot the time series of oscillators, their phase plots, and the order parameter.

plot_series(thetas, times[, color, alpha, n, ax])

Plot sin(theta) over time for the given phases thetas.

plot_order_param(thetas, times[, order, ...])

Plot the order parameter over time for the given phases thetas.

plot_phases(thetas[, radius, color, ms, ax])

Plot the phase thetas of oscillators on a circle.

plot_phases_line(thetas[, ax])

Plot the phases thetas of oscillators in order of node index.

plot_phases_ring(H, thetas[, cmap, ax, colorbar])

Plot the phase of oscillators at time it on a circle.