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

Home » Public Forums » archive » Re: IDL messes up Julian day plots ?
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: IDL messes up Julian day plots ? [message #13051] Fri, 02 October 1998 00:00
Thomas A. McGlynn is currently offline  Thomas A. McGlynn
Messages: 23
Registered: March 1996
Junior Member
Plotting is done using only single precision arithmetic,
but you should be OK over a two-year span. Your talking
about an interval of 900 seconds over a span of 6x10^7 or
~.0001 which is well within the resolution of a real.

It's a little kludgy, but you could do something like

common mydates, time0

time0 = times(0)
times = times-time0
plot, times, ..., xtickformat='NEWlabel_date'

with
function NEWlabel_date, axis, index, value
common mydates, time0
return, label_date,axis,index,value+time0
end


Since you've gotten rid of a potentially large offset
value in the plotting you should get the full benefit
of single precision, but are still able to label
things appropriately.

Tom McGlynn
tam@silk.gsfc.nasa.gov


LC's No-Spam Newsreading account wrote:
>
> I have a 2-year-long list of samples, one sample every 15 min.
> The times are stored in Unix format (integer seconds since 1970).
>
> I want to plot this using label_date to annotate the x axis. I do
>
> ; convert to julian days
> times=double(a.data.time)
> times=times/86400.
> times=times + julday(1,1,1970)
>
> dummy=label_date(date_format='%D %M')
> plot,times,a.data.nitem ,xtickformat='label_date'
>
> If I restrict the plot to shorter periods e.g.
> plot,times(u),a.data(u).nitem ,xtickformat='label_date'
>
> I get that several points are plotted at the same abscissa (x coordinate)
> even if the values of a.data.time and times are distinct.
>
> It looks like the plotting routines are unable to scale double precision
> values correctly. On the other hand I'd say I need such precision with "large"
> numbers like dates in julian days. And I need julian days to use label_date.
>
> Any clue ?
>
[Message index]
 
Read Message
Previous Topic: Copying IDL objects
Next Topic: IDL messes up Julian day plots ?

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

Current Time: Sun Oct 12 07:22:29 PDT 2025

Total time taken to generate the page: 0.07813 seconds