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

Home » Public Forums » archive » Re: two issues with julian dates
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: two issues with julian dates [message #54811 is a reply to message #54809] Wed, 11 July 2007 15:43 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Josh wrote:
> On Jul 11, 3:58 pm, David Fanning <n...@dfanning.com> wrote:
>> Josh writes:
>>> I've got date and time strings that I've parsed into their respective
>>> hour/minute/etc and month/day/etc form and I'm using the julday()
>>> function to turn them into julian dates. I've come across two
>>> problems that hopefully somebody can help me with.
>>> First off, according to NASA (http://ssd.jpl.nasa.gov/tc.cgi#top), the
>>> returned value of julday() is incorrect. When I use 11/18/2003 at
>>> 16:14:43, I get 2452955.2 from IDL and 2452962.1768866 from NASA.
>>> Thoughts?
>>> Second, the fact that julday() only returns a value with ONE digit
>>> after the decimal is not cool. If it returns a double floating point
>>> value, shouldn't I be able to get 14 sig figs? The time scales in my
>>> data set are such that I need that resolution. Thoughts?
>> Humm. Are you using *this* IDL!
>>
>> IDL> print, julday(11, 18, 2003, 16, 14, 43), format='(F 20.10)
>> 2452962.1768865748
>>
>> Cheers,
>>
>> David
>>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>
> Perhaps it is because it is getting late into the afternoon, but I
> can't use that technique to stuff the new Julian date into a variable,
> correct? If I want to just save that beautifully long number in an
> array, how can I keep it formatted like that?
>

it is saved properly.... it is rounded when you display it only!
to convince yourself:
a = julday(11, 18, 2003, 16, 14, 43)
>> 2452962.1768865748
print, a - 2452962.0

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLgrAxis determining character dimensions
Next Topic: Array concatenation

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

Current Time: Fri Oct 10 21:35:57 PDT 2025

Total time taken to generate the page: 1.68444 seconds