View previous topic :: View next topic |
Author |
Message |
akselfr
Joined: 10 Dec 2003 Posts: 15
|
Posted: Wed Dec 10, 2003 10:39 am Post subject: EqualIntervals anomalies |
|
|
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 ?? |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Wed Dec 10, 2003 1:48 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Wed Dec 10, 2003 2:53 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Thu Dec 11, 2003 12:33 am Post subject: |
|
|
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 |
|
Back to top |
|
|
akselfr
Joined: 10 Dec 2003 Posts: 15
|
Posted: Wed Dec 17, 2003 10:37 am Post subject: |
|
|
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. |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Wed Dec 17, 2003 4:22 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Thu Dec 18, 2003 10:48 pm Post subject: |
|
|
Aksel,
Thanks again for your input. Problem is fixed in 1.9.0.9, uploaded tonight (Thursday, Dec 1 _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
|