elephant.phase_analysis.mean_phase_vector¶
-
elephant.phase_analysis.mean_phase_vector(phases, axis=0)[source]¶ Calculates the mean vector of phases.
This function expects phases (in radians) and uses their representation as complex numbers to calculate the direction
and the length
r of the mean vector.Parameters: - phasesnp.ndarray
Phases in radians.
- axisint, optional
Axis along which the mean vector will be calculated. If None, it will be computed across the flattened array. Default: 0
Returns: - z_mean_thetanp.ndarray
Angle of the mean vector. Range:
![(-\pi, \pi]](../../../_images/math/b92be659c8e805ddee7ba60bf623d9a1cf10bfe7.png)
- z_mean_rnp.ndarray
Length of the mean vector. Range:
![[0, 1]](../../../_images/math/8027137b3073a7f5ca4e45ba2d030dcff154eca4.png)