pingouin.circ_axial

pingouin.circ_axial(alpha, n)[source]

Transforms n-axial data to a common scale.

Parameters
alphaarray

Sample of angles in radians

nint

Number of modes

Returns
alphafloat

Transformed angles

Notes

Tranform data with multiple modes (known as axial data) to a unimodal sample, for the purpose of certain analysis such as computation of a mean resultant vector (see Berens 2009).

Examples

Transform degrees to unimodal radians in the Berens 2009 neuro dataset.

>>> import numpy as np
>>> from pingouin import read_dataset
>>> from pingouin.circular import circ_axial
>>> df = read_dataset('circular')
>>> alpha = df['Orientation'].values
>>> alpha = circ_axial(np.deg2rad(alpha), 2)