netsse.tools.misc_func.ang_mean#
- netsse.tools.misc_func.ang_mean(angles, unit='deg')#
Calculates the mean angle from an array of angular data.
This function properly handles the circularity of angles at 360 degrees.
- Parameters:
angles (array_like) – Array of angles.
unit ({'deg','rad'}, optional) – Specifies the unit of the angles as
'rad'
or'deg'
. The default is'deg'
.
- Returns:
mean_a – Mean angle in the range [-180,180) degrees.
- Return type:
See also
Example
>>> mean_angle = ang_mean(angles, unit='deg')