EqualIntervals anomalies

Found a bug? Tell us about it here

Moderator: DPlotAdmin

Post Reply
akselfr
Posts: 15
Joined: Wed Dec 10, 2003 8:11 am

EqualIntervals anomalies

Post by akselfr »

I am using EqualIntervals (Cubic Spline interpolation) simply to
increase the number of data points so as to produce smoother curves.
For a long time I have noticed that very often the last data point
is not regenerated in the interpolation process. This can be easily
fixed by cutting and pasting though.

With the new rel.1.9 I've experienced further and more severe anomalies.

As an example, I have a set of data points with x from 9.700 to 12.700,
spaced dx=0.015, i.e. a total of 201 points. Now I use EqualIntervals
to decrease my spacing to, say 0.0015, which should leave me with
2001 points in the new data set. However, the new X-start is at
9.7005 and X-end is at 12.699, totaling 2000 points, one less than
expected, and without including the original end points.

If instead I use dx=0.005 to create 601 new points, X-start is 9.700
as expected, but I loose the last point at x=12.700, giving me
600 points, one less than expected. This behaviour has been normal
for some time.

Now, with dx=0.001 I would expect 3001 points. I get 3000, one less
as before, but now the interpolated data become junk with values
reaching approx. +- 10**88. It does not matter what the y-values
are in the original data set.

Any clues as to what goes wrong ??
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

These are all precision/roundoff problems that should be easy enough to fix. Thanks for your examples, those will help test things.

With any luck I'll be posting an update late tonight, will mention it here when it is available.
Visualize Your Data
support@dplot.com
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Actually the first problem you mentioned (using dx=0.0015) isn't due to roundoff at all. DPlot is forcing the start and end points to be multiples of the interval. I can't think of a good reason to do this and am not real sure why it was ever done that way. This is changed; your examples now work as expected.

Update will be posted tonight. Thanks again for your input.
Visualize Your Data
support@dplot.com
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Aksel,
I've just posted v1.9.0.8. You should find that Equal Intervals works much more like you'd expect now. Also the AddCurves (and others) problems are fixed. Thanks again for your input.
Visualize Your Data
support@dplot.com
akselfr
Posts: 15
Joined: Wed Dec 10, 2003 8:11 am

Post by akselfr »

Dave,

Thanks for the prompt response and the new 1.908 rel.

I am still finding problems with the EqualIntervals command though.

Eg. generate y(x) = 0.12+0.26*sin(26*x) (x in radians)
within x = 3.1 to 3.5 with a spacing of dx=0.002, corresponding
to a total of 201 points.

Now use EqualIntervals (Cubic Spline Interp.) to achieve a spacing
of dx=0.001. The resulting curve is 'garbage', but with a typical
'ringing' structure, which is sometimes seen in interpolation.
Data comes out between approx. +- 10**88.

The same behaviour is observed with dx=0.0005 and dx=0.0001,
although in the latter case, data comes out in the range +- 10**204.

Any clues as to what goes wrong ??

It seems to be very dependent on the x-range an x-increment.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Aksel,
Unfortunately the spline function is broken - another artifact of switching from single- to double-precision. Sorry for the trouble. It is fixed on my system. I'm currently running around in circles with a 'Redo' feature; I'll post an update tomorrow night with or without Redo.
Visualize Your Data
support@dplot.com
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Aksel,
Thanks again for your input. Problem is fixed in 1.9.0.9, uploaded tonight (Thursday, Dec 18)
Visualize Your Data
support@dplot.com
Post Reply