elephant.phase_analysis.phase_locking_value¶

elephant.phase_analysis.
phase_locking_value
(phases_i, phases_j)[source]¶ Calculates the phase locking value (PLV).
This function expects the phases of two signals (each containing multiple trials). For each trial pair, it calculates the phase difference at each time point. Then it calculates the mean vectors of those phase differences across all trials. The PLV at time t is the length of the corresponding mean vector.
Parameters:  phases_i, phases_j(t, n) np.ndarray
Timeseries of the first and second signals, with t time points and n trials.
Returns:  plv(t,) np.ndarray
Vector of floats with the phaselocking value at each time point. Range:
Raises:  ValueError
If the shapes of phases_i and phases_j are different.
Notes
This implementation is based on the formula taken from [1] (pp. 195):
where is the phase difference at time t for trial n.
References
[1] JeanPhilippe Lachaux, Eugenio Rodriguez, Jacques Martinerie, and Francisco J. Varela, “Measuring Phase Synchrony in Brain Signals” Human Brain Mapping, vol 8, pp. 194208, 1999.