elephant.phase_analysis.phase_difference¶
-
elephant.phase_analysis.phase_difference(alpha, beta)[source]¶ Calculates the difference between a pair of phases.
The output is in range from
to
.Parameters: - alphanp.ndarray
Phases in radians.
- betanp.ndarray
Phases in radians.
Returns: - phase_diffnp.ndarray
Difference between phases alpha and beta. Range:
![[-\pi, \pi]](../../../_images/math/c390c1a6d15680189d9fadbd9ab0a2e20a91fc1c.png)
Notes
The usage of np.arctan2 ensures that the range of the phase difference is
and is located in the correct quadrant.