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 #33729 is a reply to message #33728] Thu, 23 January 2003 12:02 Go to previous messageGo to previous message
Kolbjorn Bekkelund is currently offline  Kolbjorn Bekkelund
Messages: 20
Registered: August 2002
Junior Member
Craig Markwardt wrote:
> Kolbjorn Bekkelund <kolbjorn@arctic-linux.tnett.no> writes:
>
>
>> How can I add the NEEDED d to get this:
>>
>> 2452662.305203d
>>
>> out of this:
>> maxtime = jul2cal((data(0,maxgust_time)), /TO_STRING, /MDY)
>>
>> In my program (data(0,maxgust_time)) fetches 2452662.305203 out of the
>> array, but if I don't add the d to the julian date it calculates the
>> wrong time in the above statement.
>
>
> You can use
> double(data(0,maxgust_time)),
> but the variable DATA should already be in double precision. At least
> it should be if you expect 13 decimal digits of precision to be
> maintained. When you type the number directly on the command line,
> you probably do have to use the "D" to indicate double precision, but
> you should not have to if the variable DATA is already double.
>
> Craig
>

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 ?

Kolbjorn


--
* |
| *
* |
| * |(
Kolbjorn Bekkelund * | ==|==
Systems Eng. ALOMAR Observatory | * |___|
Andoya Rocket Range ====================== |
.-. http://alomar.rocketrange.no \ [] [] [] [] [] / | ----
/v\ eMail: kobe@rocketrange.no '----------------'-------| |
/( )\ Using Linux for Science..... | [ ] | | [] | | | |
^^ ^^ --------------------------------------------------'--------- --
[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: Sun Oct 12 02:24:41 PDT 2025

Total time taken to generate the page: 0.64038 seconds