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

Home » Public Forums » archive » [start:final:step] bug
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
[start:final:step] bug [message #90258] Sat, 14 February 2015 23:45 Go to next message
Dae-Kyu Shin is currently offline  Dae-Kyu Shin
Messages: 25
Registered: February 2015
Junior Member
hi. here is example code


CDF_EPOCH, ts, 2008, 1, 1, 0, 0, 0, 0, /compute
CDF_EPOCH, te, 2009, 1, 1, 0, 0, 0, 0, /compute
step = 5*60d*1d3

res = [ts:te:step]
plot, res,/ys

not monotonic increase

Similarly

CDF_TT2000, ts, 2008, 1, 1, 0, 0, 0, 0, 0, 0, /compute
CDF_TT2000, te, 2009, 1, 1, 0, 0, 0, 0, 0, 0, /compute
step = 300000000000LL

res = [ts:te:step]
plot, res,/ys


thanks


idl 8.3 on ubuntu 12.04
Re: [start:final:step] bug [message #90331 is a reply to message #90258] Sat, 21 February 2015 07:35 Go to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
Are you looking at your time values or only at the plot? I cannot test the [start:stop:step] syntax, but I do not have any problems...


CDF_TT2000, ts, 2008, 1, 1, 0, 0, 0, 0, 0, 0, /compute
CDF_TT2000, te, 2009, 1, 1, 0, 0, 0, 0, 0, 0, /compute
step = 5*60d*1d9
nsteps = long64((te - ts) / step)
time = ts + l64indgen(nsteps+1) * step
plot, time[1:-1] - time[0:-2], /YSTYLE, YRANGE=[2.9d11, 3.1d11]
print, stddev(time[1:-1] - time[0:-2])
0.0000000


CDF_TT2000, ts, 2008, 1, 1, 0, 0, 0, 0, 0, 0, /compute
CDF_TT2000, te, 2009, 1, 1, 0, 0, 0, 0, 0, 0, /compute
step = 300000000000LL
nsteps = (te - ts) / step
time = ts + l64indgen(nsteps+1) * step
plot, time[1:-1] - time[0:-2], /YSTYLE, YRANGE=[2.9d11, 3.1d11]
print, stddev(time[1:-1] - time[0:-2])
0.00000
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cgPlot equivalent to graphic = PLOT(Equation,... ?
Next Topic: Interpolation

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

Current Time: Wed Oct 08 09:18:35 PDT 2025

Total time taken to generate the page: 0.00524 seconds