comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: unwrap modulo 2pi
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: unwrap modulo 2pi [message #23636 is a reply to message #23634] Wed, 07 February 2001 12:39 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I just don't see that you can do this at all. Modulo operator discards
information about the number of multiples of B from A, leaving only the
remainder of the division operation. For example, if:

c = [2., 4., 6., 1.71681, 3.71681, 5.71681]
b = 2*!PI

; Each of the following A will produce the given
; C through "C=A mod B" :

a=[2.,4.,6.,8.,10.,12.]
a=[2.,4.,6.,8.,10.,12.] + b
a=[2.,4.,6.,8.,10.,12.] +2*b

a=[2.,4.,6.,8.,10.,12.] & a[3:5] = a[3:5] + 3*b

Unless I am missing something, I see no way how a unique solution can be
obtained from the *remainder of division* and *divisor*. But I studied
arithmetics a long time ago :-)

Cheers,
Pavel

graham_wilson@my-deja.com wrote:
>
> My appologies for not being explicit enough...
>
> IDL> a=[2,4,6,8,10,12]
> IDL> a=[2.,4.,6.,8.,10.,12.]
> IDL> b=2*!PI
> IDL> c=a mod b
> IDL> print, c
> 2.00000 4.00000 6.00000 1.71681 3.71681 5.71681
>
> What I mean by 'unwraping' is: Given I know 'c' and 'b' how do I
> explicitly find a?
>
> GW
>
> In article <3A817F92.1DBCDCCA@noaa.gov>,
> "Pavel A. Romashkin" <pavel.romashkin@noaa.gov> wrote:
>> I am sorry, but I am still a little behind here, please bear with me.
>> Must be the lack of coffe. What is the "unwrapping of the function
>> mod(x,y)" ? I might think of a solution if I knew what I am looking
> at.
>>
>> Cheers,
>> Pavel
>
> Sent via Deja.com
> http://www.deja.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL programmers wanted
Next Topic: Re: True Color, but !d.table_size eq 64?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 12:12:15 PDT 2025

Total time taken to generate the page: 1.51854 seconds