[start:final:step] bug [message #90258] |
Sat, 14 February 2015 23:45  |
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  |
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
|
|
|