Unwrap radian phases by adding multiples of 2*pi as appropriate to remove jumps greater than tol. tol defaults to pi.
Unwrap will unwrap along the first non-singleton dimension of a, unless the optional argument dim is given, in which case the data will be unwrapped along this dimension