netsse.tools.misc_func.ang_diff =============================== .. py:function:: netsse.tools.misc_func.ang_diff(alpha, beta, unit='deg') Calculates the signed difference between two angles. :param alpha: Input angle as a scalar value or as an array of angles. :type alpha: float or array_like :param beta: Input angle as a scalar value or as an array of angles. :type beta: float or array_like :param unit: Specifies the unit of the angles as ``'rad'`` or ``'deg'``. The default is ``'deg'``. :type unit: {'deg','rad'}, optional :returns: **delta** -- The output difference between alpha and beta in the range [-180,180] degrees. .. note:: This function subtracts ``alpha`` from ``beta``, i.e., computes the signed difference ``beta-alpha``, taking into account the circularity at 360 degrees. :rtype: float or array_like .. seealso:: :py:obj:`re_range` Converts angles to a new range of values. :py:obj:`ang_mean` Calculates the mean angle from an array of angular data. :py:obj:`ang_std` Calculates the circular standard deviation for an array of angular data. .. rubric:: Example >>> delta = ang_diff(alpha, beta, unit='deg')