pingouin.circ_axial#
- pingouin.circ_axial(angles, n)[source]#
Transforms n-axial data to a common scale.
- Parameters:
- anglesarray
Sample of angles in radians
- nint
Number of modes
- Returns:
- anglesfloat
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') >>> angles = df['Orientation'].to_numpy() >>> angles = circ_axial(np.deg2rad(angles), 2)