Re: [julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
I'm thinking, given that the phase map was produced by applying Base.angle() on another (complex) matrix (say we call it M), it is this function which caused the phase wrapping in the first place, right? So can't I somehow get around the problem and produce the unwrapped map directly from M?

Re: [julia-users] Re: compute quantity along contour

2015-02-04 Thread Jason Merrill
On Wednesday, February 4, 2015 at 8:54:27 AM UTC-8, Andrei Berceanu wrote: I'm thinking, given that the phase map was produced by applying Base.angle() on another (complex) matrix (say we call it M), it is this function which caused the phase wrapping in the first place, right? So can't I

[julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
Sorry, perhaps I did not explain myself :) One can see the phase oscillates between -\pi and \pi. I would like to compute how many times the phase changes by 2\pi as one goes around the origin. On Wednesday, February 4, 2015 at 1:31:53 AM UTC+1, Steven G. Johnson wrote: On Tuesday, February

[julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
I guess what I'm trying to say is that your answer makes sense for continuous functions, while mine has jumps of 2\pi, and so the phase change is equal to the total number of these jumps (times 2\pi). Does this make sense? On Wednesday, February 4, 2015 at 11:36:51 AM UTC+1, Andrei Berceanu

Re: [julia-users] Re: compute quantity along contour

2015-02-04 Thread Michele Zaffalon
Wouldn't the answer depend on the path you choose? On Wed, Feb 4, 2015 at 3:04 PM, Andrei Berceanu andreiberce...@gmail.com wrote: I guess what I'm trying to say is that your answer makes sense for continuous functions, while mine has jumps of 2\pi, and so the phase change is equal to the

Re: [julia-users] Re: compute quantity along contour

2015-02-04 Thread Andrei Berceanu
I'm hoping it wouldn't, but it is actually one of the things I would like to test. On Wednesday, February 4, 2015 at 3:17:39 PM UTC+1, Michele Zaffalon wrote: Wouldn't the answer depend on the path you choose? On Wed, Feb 4, 2015 at 3:04 PM, Andrei Berceanu andreib...@gmail.com javascript:

Re: [julia-users] Re: compute quantity along contour

2015-02-04 Thread Yuuki Soho
It seems you want to unwrap the phase (plus pi) along your path: https://gist.github.com/ssfrr/7995008 But as you data are quite discrete, I'm not sure it will work. Maybe if you interpolate.

[julia-users] Re: compute quantity along contour

2015-02-03 Thread Steven G. Johnson
On Tuesday, February 3, 2015 at 1:17:15 PM UTC-5, Andrei Berceanu wrote: How can I numerically compute the total change in phase as one goes around a closed loop centered on the site $m=n=0$? Seems like totalchangeinphase(m,n) = 0 would work and be very efficient. (As you described