Jack_111
Jack_111

Reputation: 891

Unwrapping with unwrap function

I have wrapped phases and I want to unwrap them using the function "wrap". However, in this case I can't get the unwrapped phases for reasons unclear to me.

The wrapped phases are enter image description here

and by looking at the cross section I can see that the phases are wrapped

I have scaled the image to be from 0 to 2*pi by:

ScaledWrapped = Wrapped*7*2*pi;

enter image description here

When applying the function unwrap:

UnwrappedImage = unwrap(ScaledWrapped);

I don't get unwrapped phases and I don't know why. The result is :

enter image description here

and I don't know what's going wrong!

Any suggestions please!!

Many thanks in advance

Upvotes: 4

Views: 1935

Answers (1)

anon
anon

Reputation:

Your data may not have proper jumps. From help unwrap: unwrap(P) unwraps radian phases P by changing absolute jumps greater than or equal to pi to their 2*pi complement.

See how bad scaling of data (compare y and y1) results in different unwrapped data:

x = linspace(0,pi,20)';
y = [x;x;x;x;x;];
y1 = 1.1*y;
plot(y,'ro'); hold on; plot(unwrap(y)); hold on; plot(unwrap(y1))

enter image description here

Upvotes: 2

Related Questions