hypersynchronization.generate_q_twisted_state#

hypersynchronization.generate_q_twisted_state(N, q, noise=0.01, seed=None)[source]#

Generate a q-twisted state for N phase oscillators.

Parameters:
Nint

The number of oscillators.

qint

The number of twists.

noisefloat, optional

The magnitude of gaussian noise added to the phases. Default is 1e-2.

seedint, numpy.random.Generator, or None, optional

Seed for the random number generator. Default is None.

Returns:
thetanumpy.ndarray of shape (N,)

Array of generated phase angles representing the initial state.

See also

generate_state

Unified interface for all initial-condition types.

identify_q_twisted

Identify a q-twisted state from phases.

Examples

>>> import numpy as np
>>> import hypersynchronization as hs
>>> theta = hs.generate_q_twisted_state(10, q=1, noise=0)
>>> theta.shape
(10,)
>>> np.allclose(np.diff(theta), 2 * np.pi / 10)
True