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

Home » Public Forums » archive » Re: Bug in IDL's TIMEGEN function
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: Bug in IDL's TIMEGEN function [message #55681 is a reply to message #55583] Mon, 27 August 2007 10:01 Go to previous messageGo to previous message
Dave Wuertz is currently offline  Dave Wuertz
Messages: 6
Registered: August 2007
Junior Member
chris_torrence@NOSPAMyahoo.com said the following on 8/24/2007 6:19 PM:
> Hi Dave,
>
> Good catch! This is indeed a bug. I've just fixed the code for the
> next IDL release.
>
> If you want, you can patch your copy of timegen. Go to your $IDL_DIR/
> lib/timegen.pro.
> Around line 400, replace the following bad lines:
> monthArray = (monthArray MOD 12) + 1
> IF (step_size LT 0) THEN monthArray = (monthArray + 12) MOD 12
> With the following good lines:
> if (step_size ge 0) then begin
> monthArray = (monthArray mod 12) + 1
> endif else begin
> monthArray = (((monthArray mod 12) + 12) mod 12) + 1
> endelse
>
> Using this version, I get the following results:
> IDL> MyTimes = TIMEGEN( units="Months", step_size=-1, $
> IDL> start=julday(1,15,2007), final=julday(10,15,2006))
> IDL> print, MyTimes - MyTimes(0)
> 0.00000000 -31.000000 -61.000000 -92.000000
>
> Hope this didn't cause you too many problems.
> Cheers,
>
> Chris Torrence
> ITT Visual Information Solutions
>

Thank you, Chris, for jumping on this and providing a patch so quickly!

Thanks also to David Fanning for testing the behavior on his platform.

-Dave Wuertz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Natural size of explicitly-sized widget
Next Topic: Weighted histogram

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

Current Time: Sun Oct 12 06:02:41 PDT 2025

Total time taken to generate the page: 1.36450 seconds