Re: [julia-users] Re: compute quantity along contour
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 somehow get around the problem and produce the unwrapped map > directly from M? > It sounds like you're trying to compute the winding number of the field for a path around a point. Maybe http://en.wikipedia.org/wiki/Winding_number#Complex_analysis will get you started. If you want more advice about computing discretized line integrals, folks can probably provide suggestions about good ways to implement that.
Re: [julia-users] Re: compute quantity along contour
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? On Wednesday, February 4, 2015 at 4:41:12 PM UTC+1, Yuuki Soho wrote: > > 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. > > >
Re: [julia-users] Re: compute quantity along contour
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.
Re: [julia-users] Re: compute quantity along contour
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 > 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 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 >> wrote: >>> >>> 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 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 your problem, your phase sounds like a single-valued function of m & n, hence the total change around any closed loop would be zero. Unless you mean something different by "total change"?) >>> >
Re: [julia-users] Re: compute quantity along contour
Wouldn't the answer depend on the path you choose? On Wed, Feb 4, 2015 at 3:04 PM, Andrei Berceanu 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 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 wrote: >> >> 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 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 your problem, your >>> phase sounds like a single-valued function of m & n, hence the total change >>> around any closed loop would be zero. Unless you mean something different >>> by "total change"?) >>> >>