tensorpac.methods.preferred_phase

tensorpac.methods.preferred_phase(pha, amp, n_bins=18)[source]

Compute the preferred phase.

Parameters
pha, amparray_like

Respectively the phase of slower oscillations of shape (n_pha, n_epochs, n_times) and the amplitude of faster oscillations of shape (n_pha, n_epochs, n_times).

n_binsint | 72

Number of bins for bining the amplitude according to phase slices.

Returns
binned_amparray_like

The binned amplitude according to the phase of shape (n_bins, n_amp, n_pha, n_epochs).

pparray_like

The prefered phase where the amplitude is maximum of shape (namp, npha, n_epochs).

polarvecarray_like

The phase vector for the polar plot of shape (n_bins,)