bartorch.unwrap

Contents

bartorch.unwrap#

bartorch.unwrap()#

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:
  • input (torch.Tensor) – Wrapped phase, in its real part.

  • axis (int) – Axis to unwrap along.

  • bound (float, default=pi) – Half the period.

Returns:

The shape of input.

Return type:

torch.Tensor