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

Home » Public Forums » archive » CalDat
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
CalDat [message #25034] Tue, 15 May 2001 12:07 Go to previous message
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
Hello,

I think I have found bugs in the the CalDat procedure. I
thought it best to run it by here before contacting RSI.

This is from the online help:


> ... use something like:
> CALDAT, 2529161.36, Month, Day, Year, Hour, Minute, Second
> PRINT, Month, Day, Year, Hour, Minute, Second
>

Here are my observations:

1) Unless the Julian Day Number is double precision, the
minute and hour are always zero.
2) I don't believe the hour is correctly determing when
the Julian Day number is provided as single precision.
If the Julian Day begins at 1200 on a given day, then 0.36 *
24 + 12 = 20.6 (fraction of day * hours per day + offset =
hour number of day)

As single precision:

IDL> CALDAT, 2529161.36, Month, Day, Year, Hour, Minute,
Second
IDL> PRINT, Month, Day, Year, Hour, Minute, Second
7 4 2212 18
0 0.00000000

As double precision:

IDL> CALDAT, 2529161.36d, Month, Day, Year, Hour, Minute,
Second
IDL> PRINT, Month, Day, Year, Hour, Minute, Second
7 4 2212 20
38 23.999989

As long integer:

IDL> CALDAT, 2529161L, Month, Day, Year, Hour, Minute,
Second
IDL> PRINT, Month, Day, Year, Hour, Minute, Second
7 4 2212 12
0 0.00000000


I hope some folks will confirm this result on other machines
before I send along a bug report to RSI; perhaps this has
been noted before.

IDL> print, !version
{ x86 Win32 Windows 5.4 Sep 25 2000 32 64}


Thanks,

Ben
--
Ben Tupper
248 Lower Round Pond Road
POB 106
Bristol, ME 04539

Tel: (207) 563-1048
Email: PemaquidRiver@tidewater.net
[Message index]
 
Read Message
Read Message
Previous Topic: HDF-EOS and IDL
Next Topic: Problem with STRSPLIT using /EXTRACT

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

Current Time: Wed Oct 08 18:11:43 PDT 2025

Total time taken to generate the page: 0.00448 seconds