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

Home » Public Forums » archive » Re: How to add 'd' to get the correct julian conversion ?
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: How to add 'd' to get the correct julian conversion ? [message #33728 is a reply to message #33727] Thu, 23 January 2003 14:15 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kolbjorn Bekkelund (kolbjorn@arctic-linux.tnett.no) writes:

> I've checked my array a bit more and it seems as if there's something
> wrong with it. From the file I'm reading in with read-ascii I should
> have this:
> 2452662.499876 2.719500 6.216000 343.494000
> 955.793400 93.911600 -5.444307
>
> but the print, data in IDL shows:
> 2.45266e+06 2.71950 6.21600 343.494 955.793
> 93.9116 -5.44431
>
> If I replace the read-acsii with Reimar Bauers read_data_file I get:
> 2452662.5 2.7195000 6.2160000 343.49400
> 955.79340 93.911600 -5.4443070
>
> but as you see the julian date in the first element is wrong in both
> arrays. How can I do ensure that I get all digits inserted ?

Ah, yes, I suspected this might be the problem earlier, but
I didn't have time to respond properly. I think you will
be interested in this article:

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

The specific answer to your question is to read your
data into a double-precision variable. Since I've never
used READ_ASCII I can't tell you how to do this, although
I presume there must be a way. :-(

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to eliminate trailing zeros in a string?
Next Topic: PNGs with alpha channel?

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

Current Time: Mon Dec 01 00:04:33 PST 2025

Total time taken to generate the page: 1.44143 seconds