Last updated on Sep 04, 2024.

netsse.tools.misc_func.re_range#

netsse.tools.misc_func.re_range(theta, start=0, unit='deg')#

Converts angles to a new range (of extent 360 degrees).

Parameters:
  • theta (array_like) – Array of angles to be rearranged.

  • start (float, default 0) – Lower boundary of the range that should contain the new values of theta. The upper boundary will be set automatically to start + 360 degrees.

  • unit ({'deg','rad'}, optional) – Specifies the unit of theta and start as 'rad' or 'deg'. The default is 'deg'.

Returns:

theta_rerange – Array of angles where the elements of theta have been converted to the new range [start, start+360) degrees.

Return type:

array_like

See also

ang_diff

Calculates the signed difference between two angles.

Example

>>> theta_rerange = re_range(theta,start=0,unit='deg')