bartorch.unwrap

Contents

bartorch.unwrap#

bartorch.unwrap(input, axis, *, bound=math.pi)#

Unwrap the real part along axis: remove the jumps a period of 2 * bound puts in it.

A jump d between neighbours with |d| > bound is corrected by -sign(d) * ceil(|d| / bound) * bound, which is 2 * bound for any jump a wrapped signal can have (|d| < 2 * bound) and matches numpy.unwrap() with period=2 * bound there. The imaginary part is left alone.

Parameters:

bound (float) – Half the period (-b).