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

Home » Public Forums » archive » Julian time problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Julian time problem [message #51492] Fri, 24 November 2006 03:16
corinnefrey is currently offline  corinnefrey
Messages: 18
Registered: November 2006
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Is it really more efficient to work with arrays than FOR loops?
Next Topic: getting an IDLgrPlot drawn

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

Current Time: Wed Oct 08 17:10:05 PDT 2025

Total time taken to generate the page: 0.00505 seconds