bugGNU Octave - Bugs: bug #50494, griddata loses precision in the...

 
 

bug #50494: griddata loses precision in the linear interpolation of 3 column vectors (using Delaunay triangles)

Submitted by:  El Colmo <elcolmo>
Submitted on:  Wed 08 Mar 2017 04:48:24 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: Need InfoAssigned to: None
Originator Name: ColmoOpen/Closed: Open
Release: 4.2.1Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 29 Aug 2017 09:30:21 PM UTC, comment #3:

For the example given in testcase.m, it seems that only {"Qt", "Qbb", "Qc"} has a siginificant effect, so I suppose we should use that?

John W. Eaton <jwe>
Project Administrator
Fri 10 Mar 2017 01:38:07 PM UTC, comment #2:

Sure. Please see the attachments. There is noticeable triangulation (lack of precision) in the un-patched griddata results, compared to the patched results.

(file #39957, file #39958, file #39959, file #39960)

El Colmo <elcolmo>
Fri 10 Mar 2017 05:05:21 AM UTC, comment #1:

Do you have sample code that demonstrates the problem? It is important that we be able to verify that the suggested change works.

Rik <rik5>
Project Administrator
Wed 08 Mar 2017 04:48:24 PM UTC, original submission:

The griddata function loses precision when calculating the linear interpolation of 3 column vectors (using Delaunay triangles), since only the x and y parameters are passed to "delaunay" (ie, using the default QHull options). This results in triangle elimination in "delaunay". When the generated (reduced) set of triangles is searched by "tsearch", the resultant interpolated value is less precise than expected.

The fix is trivial - to change the parameters passed to "delaunay", so that the default QHull options are no longer used, resulting in no triangle elimination by "delaunay", resulting in greatly increased precision of the interpolated values.

The fix is trivial. In Change the following line (in "/usr/share/octave/4.0.3/m/geometry/griddata.m", in my deployment) from:
to either..
or...

Note: this is also an issue in the latest available version of Octave (4.2.1).

El Colmo <elcolmo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #39957:  testcase.m added by elcolmo (99KiB - text/x-objcsrc - Testcase, raw data plotted, and results of griddata (with and without fix) plotted)
file #39958:  Screenshot from 2017-03-10 13-23-52.png added by elcolmo (161KiB - image/png - Testcase, raw data plotted, and results of griddata (with and without fix) plotted)
file #39959:  Screenshot from 2017-03-10 13-23-49.png added by elcolmo (87KiB - image/png - Testcase, raw data plotted, and results of griddata (with and without fix) plotted)
file #39960:  Screenshot from 2017-03-10 13-24-23.png added by elcolmo (191KiB - image/png - Testcase, raw data plotted, and results of griddata (with and without fix) plotted)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by elcolmo (Submitted the item)
  • -unavailable- added by elcolmo
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 29 Aug 2017 09:30:21 PM UTCjweStatusPatch Submitted=>Need Info
    Mon 13 Mar 2017 12:01:26 AM UTCrik5StatusNeed Info=>Patch Submitted
    Fri 10 Mar 2017 01:38:07 PM UTCelcolmoAttached File-=>Added testcase.m, #39957
      Attached File-=>Added Screenshot from 2017-03-10 13-23-52.png, #39958
      Attached File-=>Added Screenshot from 2017-03-10 13-23-49.png, #39959
      Attached File-=>Added Screenshot from 2017-03-10 13-24-23.png, #39960
    Fri 10 Mar 2017 05:05:21 AM UTCrik5StatusNone=>Need Info
    Wed 08 Mar 2017 04:48:24 PM UTCelcolmoCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1