hypersynchronization.order_parameter#
- hypersynchronization.order_parameter(thetas, order=1, complex=False, axis=0)[source]#
Calculate the generalised Daido order parameter of order order.
The order parameter is a measure of how the phase angles are aligned. It can be used to quantify the level of synchronization or coherence in a system.
- Parameters:
- thetasarray-like, shape (n_oscillators,) or (n_oscillators, n_times)
Phases of the oscillators over time.
- orderint, optional
The order of the order parameter. Default is 1.
- complexbool, optional
If True, return the complex order parameter. If False (default), return its magnitude.
- axisint, optional
The axis of length n_oscillators, along which the sum of the phases is taken. Default is 0.
- Returns:
- resultfloat or numpy.ndarray
If complex is True, the complex order parameter. If complex is False, the magnitude of the order parameter.
See also
identify_stateIdentify the overall synchronization state.
Examples
>>> import numpy as np >>> import hypersynchronization as hs >>> theta = np.zeros(10) # fully synchronized >>> hs.order_parameter(theta) 1.0 >>> theta = np.linspace(0, 2 * np.pi, 10, endpoint=False) # splay state >>> np.isclose(hs.order_parameter(theta), 0) True