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

Home » Public Forums » archive » two issues with julian dates
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
two issues with julian dates [message #54816] Wed, 11 July 2007 14:51 Go to next message
Josh is currently offline  Josh
Messages: 21
Registered: June 2007
Junior Member
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?

Thanks for any advice,
-Josh
Re: two issues with julian dates [message #54855 is a reply to message #54816] Tue, 17 July 2007 07:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Josh writes:

> Having given up Julian dates, in lieu of a simpler route, I am now
> simply taking the date/time and storing it as a double with respect to
> the year (e.g. 3/21/2004 @ 12:17:44.767 = 2004.2903452730). All the
> variables used to create the value were born doubles, and stayed
> doubles all along.
>
> Alas, the same problem persists. I can see the following:
> IDL> print, ROItimeArr[85], format='(F20.10)'
> 2004.2903452730
>
> But on the plot, I get 2004.2903 which is the above, sans the 'format'
> at the end. So, everything within +-0.0001 (which happens to be about
> 20% of the data set) gets put on that x value.
>
> I also tried subtracting 2004 from all the data, thinking that might
> help, but I simply get the same x values without the 2004 (e.g.
> 0.2903).

Josh reports "problem solved." Here is the take-home
message of the day: Be sure to check ALL your assumptions! :-)

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: NaNs all over the place
Next Topic: Re: Changing directories in IDL

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

Current Time: Sat Oct 11 10:33:34 PDT 2025

Total time taken to generate the page: 1.20082 seconds