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

Home » Public Forums » archive » Re: Julian time problem
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: Julian time problem [message #51490 is a reply to message #51489] Fri, 24 November 2006 05:21 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
They *are* the same:

http://www.dfanning.com/math_tips/sky_is_falling.html

You might want, instead of checking for equality,
to do something like

ind=where(abs(time1-time2) LT 1d-9)

Think that one part in 10^(10) of a day is just a few microseconds!

Ciao,
Paolo


corinnefrey@gmail.com wrote:
> Hi,
>
> I have following probem:
>
> First I define two times in the Julian system:
>
> jul_time1=JULDAY(11,5,2006,10,10)
> jul_time2=JULDAY(11,5,2006,10,20)
>
> Then I make a time array which starts at the first time given above
>
> time_array= TIMEGEN(30,units="minutes", START=jul_time1)
>
> The second time is only 10 minutes after the first time, so I should be
> able to find it in the generated time array.
>
> When I print, I get following thing:
>
> IDL> print,time_array(10),format='(d20.5)'
> 2454044.93056
> IDL> print,jul_time2,format='(d20.5)'
> 2454044.93056
>
> That seems to be ok! But if I make the difference then I don't get
> zero:
>
> IDL> print,time_array(10)-jul_time2
> 4.6566129e-010
>
> What happend here? The jul_time2 and the time_array are both in DOUBLE
> format.
>
> IDL> help,jul_time2
> JUL_TIME2 DOUBLE = 2454044.9
> IDL> help,time_array
> TIME_ARRAY DOUBLE = Array[30]
>
> I need to have both numbers the same, so that I can search in the time
> string for a desired time or date.
>
> Thanks for your help,
> corinne
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: ENVI - Output to external format - seem to be losing georeferencing
Next Topic: Re: IDL in Espana

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

Current Time: Sat Oct 11 00:57:26 PDT 2025

Total time taken to generate the page: 0.87961 seconds