control.unwrap

control.unwrap(angle, period=6.28)

Unwrap a phase angle to give a continuous curve

Parameters:

angle : array_like

Array of angles to be unwrapped

period : float, optional

Period (defaults to 2*pi)

Returns:

angle_out : array_like

Output array, with jumps of period/2 eliminated

Examples

>>> import numpy as np
>>> theta = [5.74, 5.97, 6.19, 0.13, 0.35, 0.57]
>>> unwrap(theta, period=2 * np.pi)
[5.74, 5.97, 6.19, 6.413185307179586, 6.633185307179586, 6.8531853071795865]